// $ANTLR 3.3 Nov 30, 2010 12:45:30 E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g 2013-07-08 16:49:09

// The variable 'variable' is assigned but its value is never used.
#pragma warning disable 219
// Unreachable code detected.
#pragma warning disable 162


using PAT.Common;
using PAT.Common.Classes;
using PAT.Common.Classes.LTS; // not found
using PAT.Common.Classes.Expressions;
using System.Collections.Generic;


using Antlr.Runtime;
using Stack = System.Collections.Generic.Stack<object>;
using List = System.Collections.IList;
using ArrayList = System.Collections.Generic.List<object>;
using Map = System.Collections.IDictionary;
using HashMap = System.Collections.Generic.Dictionary<object, object>;

using Antlr.Runtime.Tree;
using RewriteRuleITokenStream = Antlr.Runtime.Tree.RewriteRuleTokenStream;

namespace PAT.PN.LTS
{
    [System.CodeDom.Compiler.GeneratedCode("ANTLR", "3.3 Nov 30, 2010 12:45:30")]
    public partial class PNTreeParser : Antlr.Runtime.Parser
    {
        internal static readonly string[] tokenNames = new string[] {
		    "<invalid>", "<EOR>", "<DOWN>", "<UP>", "DEFINITION_REF_NODE", "BLOCK_NODE", "CHANNEL_NODE", "VAR_NODE", "CALL_NODE", "LET_NODE", "LET_ARRAY_NODE", "APPLICATION_NODE", "RECORD_NODE", "RECORD_ELEMENT_NODE", "RECORD_ELEMENT_RANGE_NODE", "DEFINITION_NODE", "IF_PROCESS_NODE", "ATOMIC_IF_PROCESS_NODE", "BLOCKING_IF_PROCESS_NODE", "CASE_PROCESS_NODE", "CASE_PROCESS_CONDITION_NODE", "INTERLEAVE_NODE", "PARALLEL_NODE", "INTERNAL_CHOICE_NODE", "EXTERNAL_CHOICE_NODE", "EVENT_NAME_NODE", "EVENT_WL_NODE", "EVENT_SL_NODE", "EVENT_WF_NODE", "EVENT_SF_NODE", "EVENT_PLAIN_NODE", "EVENT_NODE_CHOICE", "CHANNEL_IN_NODE", "CHANNEL_OUT_NODE", "GUARD_NODE", "PARADEF_NODE", "PARADEF1_NODE", "PARADEF2_NODE", "EVENT_NODE", "ATOM_NODE", "ASSIGNMENT_NODE", "DEFINE_NODE", "DEFINE_CONSTANT_NODE", "HIDING_ALPHA_NODE", "SELECTING_NODE", "UNARY_NODE", "ALPHABET_NOTE", "VARIABLE_RANGE_NODE", "LOCAL_VAR_NODE", "LOCAL_ARRAY_NODE", "USING_NODE", "GENERAL_CHOICE_NODE", "CLASS_CALL_NODE", "CLASS_CALL_INSTANCE_NODE", "PROCESS_NODE", "TRANSITION_NODE", "ARC_NODE", "PLACE_NODE", "SELECT_NODE", "DPARAMETER_NODE", "STRING", "ID", "INT", "WS", "COMMENT", "LINE_COMMENT", "'#'", "'import'", "';'", "'include'", "'assert'", "'|='", "'('", "')'", "'[]'", "'<>'", "'!'", "'?'", "'&&'", "'||'", "'tau'", "'->'", "'<->'", "'/\\\\'", "'\\\\/'", "'.'", "'deadlockfree'", "'nonterminating'", "'divergencefree'", "'deterministic'", "'reaches'", "'refines'", "'<F>'", "'<FD>'", "'with'", "'min'", "'max'", "','", "'alphabet'", "'{'", "'}'", "'define'", "'-'", "'true'", "'false'", "'enum'", "'var'", "'='", "'['", "']'", "'xor'", "'&'", "'|'", "'^'", "'=='", "'!='", "'<'", "'>'", "'<='", "'>='", "'+'", "'*'", "'/'", "'%'", "'++'", "'--'", "'call'", "'new'", "'hvar'", "':'", "'..'", "'if'", "'else'", "'while'", "'Process'", "'##@@'", "'@@##'", "'-->'", "'select'", "'|||'", "'@'", "'[*]'", "'interrupt'", "'\\\\'", "'case'", "'default'", "'ifa'", "'ifb'", "'atomic'", "'Skip'", "'Stop'"
	    };
        public const int EOF = -1;
        public const int T__66 = 66;
        public const int T__67 = 67;
        public const int T__68 = 68;
        public const int T__69 = 69;
        public const int T__70 = 70;
        public const int T__71 = 71;
        public const int T__72 = 72;
        public const int T__73 = 73;
        public const int T__74 = 74;
        public const int T__75 = 75;
        public const int T__76 = 76;
        public const int T__77 = 77;
        public const int T__78 = 78;
        public const int T__79 = 79;
        public const int T__80 = 80;
        public const int T__81 = 81;
        public const int T__82 = 82;
        public const int T__83 = 83;
        public const int T__84 = 84;
        public const int T__85 = 85;
        public const int T__86 = 86;
        public const int T__87 = 87;
        public const int T__88 = 88;
        public const int T__89 = 89;
        public const int T__90 = 90;
        public const int T__91 = 91;
        public const int T__92 = 92;
        public const int T__93 = 93;
        public const int T__94 = 94;
        public const int T__95 = 95;
        public const int T__96 = 96;
        public const int T__97 = 97;
        public const int T__98 = 98;
        public const int T__99 = 99;
        public const int T__100 = 100;
        public const int T__101 = 101;
        public const int T__102 = 102;
        public const int T__103 = 103;
        public const int T__104 = 104;
        public const int T__105 = 105;
        public const int T__106 = 106;
        public const int T__107 = 107;
        public const int T__108 = 108;
        public const int T__109 = 109;
        public const int T__110 = 110;
        public const int T__111 = 111;
        public const int T__112 = 112;
        public const int T__113 = 113;
        public const int T__114 = 114;
        public const int T__115 = 115;
        public const int T__116 = 116;
        public const int T__117 = 117;
        public const int T__118 = 118;
        public const int T__119 = 119;
        public const int T__120 = 120;
        public const int T__121 = 121;
        public const int T__122 = 122;
        public const int T__123 = 123;
        public const int T__124 = 124;
        public const int T__125 = 125;
        public const int T__126 = 126;
        public const int T__127 = 127;
        public const int T__128 = 128;
        public const int T__129 = 129;
        public const int T__130 = 130;
        public const int T__131 = 131;
        public const int T__132 = 132;
        public const int T__133 = 133;
        public const int T__134 = 134;
        public const int T__135 = 135;
        public const int T__136 = 136;
        public const int T__137 = 137;
        public const int T__138 = 138;
        public const int T__139 = 139;
        public const int T__140 = 140;
        public const int T__141 = 141;
        public const int T__142 = 142;
        public const int T__143 = 143;
        public const int T__144 = 144;
        public const int T__145 = 145;
        public const int T__146 = 146;
        public const int T__147 = 147;
        public const int T__148 = 148;
        public const int T__149 = 149;
        public const int T__150 = 150;
        public const int DEFINITION_REF_NODE = 4;
        public const int BLOCK_NODE = 5;
        public const int CHANNEL_NODE = 6;
        public const int VAR_NODE = 7;
        public const int CALL_NODE = 8;
        public const int LET_NODE = 9;
        public const int LET_ARRAY_NODE = 10;
        public const int APPLICATION_NODE = 11;
        public const int RECORD_NODE = 12;
        public const int RECORD_ELEMENT_NODE = 13;
        public const int RECORD_ELEMENT_RANGE_NODE = 14;
        public const int DEFINITION_NODE = 15;
        public const int IF_PROCESS_NODE = 16;
        public const int ATOMIC_IF_PROCESS_NODE = 17;
        public const int BLOCKING_IF_PROCESS_NODE = 18;
        public const int CASE_PROCESS_NODE = 19;
        public const int CASE_PROCESS_CONDITION_NODE = 20;
        public const int INTERLEAVE_NODE = 21;
        public const int PARALLEL_NODE = 22;
        public const int INTERNAL_CHOICE_NODE = 23;
        public const int EXTERNAL_CHOICE_NODE = 24;
        public const int EVENT_NAME_NODE = 25;
        public const int EVENT_WL_NODE = 26;
        public const int EVENT_SL_NODE = 27;
        public const int EVENT_WF_NODE = 28;
        public const int EVENT_SF_NODE = 29;
        public const int EVENT_PLAIN_NODE = 30;
        public const int EVENT_NODE_CHOICE = 31;
        public const int CHANNEL_IN_NODE = 32;
        public const int CHANNEL_OUT_NODE = 33;
        public const int GUARD_NODE = 34;
        public const int PARADEF_NODE = 35;
        public const int PARADEF1_NODE = 36;
        public const int PARADEF2_NODE = 37;
        public const int EVENT_NODE = 38;
        public const int ATOM_NODE = 39;
        public const int ASSIGNMENT_NODE = 40;
        public const int DEFINE_NODE = 41;
        public const int DEFINE_CONSTANT_NODE = 42;
        public const int HIDING_ALPHA_NODE = 43;
        public const int SELECTING_NODE = 44;
        public const int UNARY_NODE = 45;
        public const int ALPHABET_NOTE = 46;
        public const int VARIABLE_RANGE_NODE = 47;
        public const int LOCAL_VAR_NODE = 48;
        public const int LOCAL_ARRAY_NODE = 49;
        public const int USING_NODE = 50;
        public const int GENERAL_CHOICE_NODE = 51;
        public const int CLASS_CALL_NODE = 52;
        public const int CLASS_CALL_INSTANCE_NODE = 53;
        public const int PROCESS_NODE = 54;
        public const int TRANSITION_NODE = 55;
        public const int ARC_NODE = 56;
        public const int PLACE_NODE = 57;
        public const int SELECT_NODE = 58;
        public const int DPARAMETER_NODE = 59;
        public const int STRING = 60;
        public const int ID = 61;
        public const int INT = 62;
        public const int WS = 63;
        public const int COMMENT = 64;
        public const int LINE_COMMENT = 65;

        // delegates
        // delegators

#if ANTLR_DEBUG
		    private static readonly bool[] decisionCanBacktrack =
			    new bool[]
			    {
				    false, // invalid decision
				    false, false, false, false, false, false, false, false, false, false, 
				    false, false, false, true, true, false, false, true, false, false, false, 
				    false, false, false, false, false, false, false, false, false, false, 
				    false, false, false, false, false, false, false, false, true, false, 
				    false, false, false, false, false, false, false, true, false, false, 
				    false, false, false, false, false, false, false, false, false, false, 
				    true, false, false, true, false, false, false, false, false, false, 
				    false, false, false, false, false, false, false, false, true, true, 
				    true, false, false, true, true, false, false, false, true, false, true, 
				    true, false, false, true, true, false, false, false, false, false, false, 
				    false, false, false, false, false, false, false, false, true, false, 
				    false, true, false, false, false, false, false, false, false, false, 
				    false, false, false, true, false, false, false, false, false, , , , 
				    , , false, false, , , false, , , , , , false, false, , false, false, 
				    , false, false, false, false, false, false, false, , , , , , , , , , 
				    , false, , , , false, , , false, false, , , false, , , , , , , false, 
				    false, false, false, false, , , , , , false, false, , , , , 
			    };
#else
        private static readonly bool[] decisionCanBacktrack = new bool[0];
#endif
        public PNTreeParser(ITokenStream input)
            : this(input, new RecognizerSharedState())
        {
        }
        public PNTreeParser(ITokenStream input, RecognizerSharedState state)
            : base(input, state)
        {
            this.state.ruleMemo = new System.Collections.Generic.Dictionary<int, int>[252 + 1];

            ITreeAdaptor treeAdaptor = null;
            CreateTreeAdaptor(ref treeAdaptor);
            TreeAdaptor = treeAdaptor ?? new CommonTreeAdaptor();

            OnCreated();
        }

        // Implement this function in your helper file to use a custom tree adaptor
        partial void CreateTreeAdaptor(ref ITreeAdaptor adaptor);

        private ITreeAdaptor adaptor;

        public ITreeAdaptor TreeAdaptor
        {
            get
            {
                return adaptor;
            }
            set
            {
                this.adaptor = value;
            }
        }

        public override string[] TokenNames { get { return PNTreeParser.tokenNames; } }
        public override string GrammarFileName { get { return "E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g"; } }


        private Stack paraphrases = new Stack();
        public Specification Spec;
        public List<IToken> GlobalVarNames = new List<IToken>();
        public List<IToken> GlobalConstNames = new List<IToken>();
        public List<IToken> GlobalRecordNames = new List<IToken>();
        public List<IToken> LTLStatePropertyNames = new List<IToken>();
        public List<IToken> ChannelNames = new List<IToken>();
        public List<IToken> DefinitionNames = new List<IToken>();
        public bool IsParameterized = false;
        public bool HasArbitraryProcess = false;
        public PAT.Common.Classes.DataStructure.StringHashTable HiddenVars = new PAT.Common.Classes.DataStructure.StringHashTable(8);
        public Dictionary<string, string> WildVars = new Dictionary<string, string>();





        //public List<IToken> UsingLibraries = new List<IToken>();


        public override string GetErrorMessage(RecognitionException e, string[] tokenNames)
        {
            string msg = null;
            if (e is NoViableAltException)
            {
                //NoViableAltException nvae = (NoViableAltException)e;
                //msg = "Invalid Symbol: ="+e.Token+ "At line:" + token.Line + " col:" + token.CharPositionInLine;  // (decision="+nvae.decisionNumber+" state "+nvae.stateNumber+")"+" decision=<<"+nvae.grammarDecisionDescription+">>";
                //msg = "Invalid Symbol: " + e.Token.Text + " at line:" + e.Token.Line + " col:" + e.Token.CharPositionInLine;  // (decision="+nvae.decisionNumber+" state "+nvae.stateNumber+")"+" decision=<<"+nvae.grammarDecisionDescription+">>";
                msg = "Invalid Symbol: '" + e.Token.Text + "'";
            }
            else
            {
                msg = base.GetErrorMessage(e, tokenNames);
            }

            if (paraphrases.Count > 0)
            {
                string paraphrase = (string)paraphrases.Peek();
                msg = msg + " (possibly " + paraphrase + ")";
            }
            return msg;
        }

        public override void DisplayRecognitionError(string[] tokenNames, RecognitionException e)
        {
            string msg = GetErrorMessage(e, tokenNames);
            Spec.AddNewError(msg, e.Token);
        }

        partial void OnCreated();
        partial void EnterRule(string ruleName, int ruleIndex);
        partial void LeaveRule(string ruleName, int ruleIndex);

        #region Rules
        public class specification_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_specification();
        partial void Leave_specification();

        // $ANTLR start "specification"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:158:1: public specification : ( specBody )* ;
        [GrammarRule("specification")]
        public PNTreeParser.specification_return specification()
        {
            Enter_specification();
            EnterRule("specification", 1);
            TraceIn("specification", 1);
            PNTreeParser.specification_return retval = new PNTreeParser.specification_return();
            retval.Start = (IToken)input.LT(1);
            int specification_StartIndex = input.Index;
            CommonTree root_0 = null;

            PNTreeParser.specBody_return specBody1 = default(PNTreeParser.specBody_return);


            try
            {
                DebugEnterRule(GrammarFileName, "specification");
                DebugLocation(158, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 1)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:160:2: ( ( specBody )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:160:4: ( specBody )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(160, 4);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:160:4: ( specBody )*
                        try
                        {
                            DebugEnterSubRule(1);
                            while (true)
                            {
                                int alt1 = 2;
                                try
                                {
                                    DebugEnterDecision(1, decisionCanBacktrack[1]);
                                    int LA1_0 = input.LA(1);

                                    if ((LA1_0 == ID || LA1_0 == 66 || (LA1_0 >= 105 && LA1_0 <= 106) || LA1_0 == 128 || LA1_0 == 134))
                                    {
                                        alt1 = 1;
                                    }


                                }
                                finally { DebugExitDecision(1); }
                                switch (alt1)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:160:5: specBody
                                        {
                                            DebugLocation(160, 5);
                                            PushFollow(Follow._specBody_in_specification315);
                                            specBody1 = specBody();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, specBody1.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop1;
                                }
                            }

                        loop1:
                            ;

                        }
                        finally { DebugExitSubRule(1); }

                        DebugLocation(161, 2);
                        if (state.backtracking == 0)
                        {

                            //re-order the tree to put all declarations at the beginning.	
                            CommonTree root_1 = null;
                            root_1 = (CommonTree)adaptor.Nil();
                            for (int i = 0; i < root_0.ChildCount; i++)
                            {
                                CommonTree node = root_0.GetChild(i) as CommonTree;
                                if (node.Type == DEFINE_CONSTANT_NODE)
                                {
                                    adaptor.AddChild(root_1, node);
                                }
                            }

                            for (int i = 0; i < root_0.ChildCount; i++)
                            {
                                CommonTree node = root_0.GetChild(i) as CommonTree;
                                if (node.Type == LET_NODE || node.Type == LET_ARRAY_NODE)
                                {
                                    adaptor.AddChild(root_1, node);
                                }
                            }


                            for (int i = 0; i < root_0.ChildCount; i++)
                            {
                                CommonTree node = root_0.GetChild(i) as CommonTree;
                                if (node.Type == DEFINE_NODE)
                                {
                                    adaptor.AddChild(root_1, node);
                                }
                            }


                            for (int i = 0; i < root_0.ChildCount; i++)
                            {
                                CommonTree node = root_0.GetChild(i) as CommonTree;
                                if (node.Type == ALPHABET_NOTE)
                                {
                                    adaptor.AddChild(root_1, node);
                                }
                            }

                            for (int i = 0; i < root_0.ChildCount; i++)
                            {
                                CommonTree node = root_0.GetChild(i) as CommonTree;
                                if (node.Type == PROCESS_NODE)
                                {
                                    adaptor.AddChild(root_1, node);
                                }
                            }


                            for (int i = 0; i < root_0.ChildCount; i++)
                            {
                                CommonTree node = root_0.GetChild(i) as CommonTree;
                                if (node.Type != USING_NODE && node.Type != DEFINE_CONSTANT_NODE && node.Type != LET_NODE && node.Type != LET_ARRAY_NODE && node.Type != DEFINE_NODE && node.Type != ALPHABET_NOTE && node.Type != PROCESS_NODE)
                                {
                                    adaptor.AddChild(root_1, node);
                                }
                            }
                            root_0 = root_1;

                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("specification", 1);
                    LeaveRule("specification", 1);
                    Leave_specification();
                    if (state.backtracking > 0) { Memoize(input, 1, specification_StartIndex); }
                }
                DebugLocation(226, 1);
            }
            finally { DebugExitRule(GrammarFileName, "specification"); }
            return retval;

        }
        // $ANTLR end "specification"

        public class specBody_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_specBody();
        partial void Leave_specBody();

        // $ANTLR start "specBody"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:228:1: specBody : ( library | letDefintion | definition | assertion | alphabet | define );
        [GrammarRule("specBody")]
        private PNTreeParser.specBody_return specBody()
        {
            Enter_specBody();
            EnterRule("specBody", 2);
            TraceIn("specBody", 2);
            PNTreeParser.specBody_return retval = new PNTreeParser.specBody_return();
            retval.Start = (IToken)input.LT(1);
            int specBody_StartIndex = input.Index;
            CommonTree root_0 = null;

            PNTreeParser.library_return library2 = default(PNTreeParser.library_return);
            PNTreeParser.letDefintion_return letDefintion3 = default(PNTreeParser.letDefintion_return);
            PNTreeParser.definition_return definition4 = default(PNTreeParser.definition_return);
            PNTreeParser.assertion_return assertion5 = default(PNTreeParser.assertion_return);
            PNTreeParser.alphabet_return alphabet6 = default(PNTreeParser.alphabet_return);
            PNTreeParser.define_return define7 = default(PNTreeParser.define_return);


            try
            {
                DebugEnterRule(GrammarFileName, "specBody");
                DebugLocation(228, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 2)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:229:2: ( library | letDefintion | definition | assertion | alphabet | define )
                    int alt2 = 6;
                    try
                    {
                        DebugEnterDecision(2, decisionCanBacktrack[2]);
                        switch (input.LA(1))
                        {
                            case 66:
                                {
                                    switch (input.LA(2))
                                    {
                                        case 67:
                                        case 69:
                                            {
                                                alt2 = 1;
                                            }
                                            break;
                                        case 70:
                                            {
                                                alt2 = 4;
                                            }
                                            break;
                                        case 98:
                                            {
                                                alt2 = 5;
                                            }
                                            break;
                                        case 101:
                                            {
                                                alt2 = 6;
                                            }
                                            break;
                                        default:
                                            {
                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                NoViableAltException nvae = new NoViableAltException("", 2, 1, input);

                                                DebugRecognitionException(nvae);
                                                throw nvae;
                                            }
                                    }

                                }
                                break;
                            case 106:
                            case 128:
                                {
                                    alt2 = 2;
                                }
                                break;
                            case ID:
                            case 134:
                                {
                                    alt2 = 3;
                                }
                                break;
                            case 105:
                                {
                                    alt2 = 6;
                                }
                                break;
                            default:
                                {
                                    if (state.backtracking > 0) { state.failed = true; return retval; }
                                    NoViableAltException nvae = new NoViableAltException("", 2, 0, input);

                                    DebugRecognitionException(nvae);
                                    throw nvae;
                                }
                        }

                    }
                    finally { DebugExitDecision(2); }
                    switch (alt2)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:229:4: library
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(229, 4);
                                PushFollow(Follow._library_in_specBody333);
                                library2 = library();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, library2.Tree);

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:230:4: letDefintion
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(230, 4);
                                PushFollow(Follow._letDefintion_in_specBody338);
                                letDefintion3 = letDefintion();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, letDefintion3.Tree);

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:231:4: definition
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(231, 4);
                                PushFollow(Follow._definition_in_specBody346);
                                definition4 = definition();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, definition4.Tree);

                            }
                            break;
                        case 4:
                            DebugEnterAlt(4);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:232:4: assertion
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(232, 4);
                                PushFollow(Follow._assertion_in_specBody352);
                                assertion5 = assertion();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, assertion5.Tree);

                            }
                            break;
                        case 5:
                            DebugEnterAlt(5);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:233:4: alphabet
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(233, 4);
                                PushFollow(Follow._alphabet_in_specBody358);
                                alphabet6 = alphabet();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, alphabet6.Tree);

                            }
                            break;
                        case 6:
                            DebugEnterAlt(6);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:234:4: define
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(234, 4);
                                PushFollow(Follow._define_in_specBody363);
                                define7 = define();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, define7.Tree);

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("specBody", 2);
                    LeaveRule("specBody", 2);
                    Leave_specBody();
                    if (state.backtracking > 0) { Memoize(input, 2, specBody_StartIndex); }
                }
                DebugLocation(235, 1);
            }
            finally { DebugExitRule(GrammarFileName, "specBody"); }
            return retval;

        }
        // $ANTLR end "specBody"

        public class library_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_library();
        partial void Leave_library();

        // $ANTLR start "library"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:237:1: library : ( '#' 'import' STRING ';' -> ^( USING_NODE STRING ) | '#' 'include' STRING ';' -> ^( USING_NODE STRING ) );
        [GrammarRule("library")]
        private PNTreeParser.library_return library()
        {
            Enter_library();
            EnterRule("library", 3);
            TraceIn("library", 3);
            PNTreeParser.library_return retval = new PNTreeParser.library_return();
            retval.Start = (IToken)input.LT(1);
            int library_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal8 = null;
            IToken string_literal9 = null;
            IToken STRING10 = null;
            IToken char_literal11 = null;
            IToken char_literal12 = null;
            IToken string_literal13 = null;
            IToken STRING14 = null;
            IToken char_literal15 = null;

            CommonTree char_literal8_tree = null;
            CommonTree string_literal9_tree = null;
            CommonTree STRING10_tree = null;
            CommonTree char_literal11_tree = null;
            CommonTree char_literal12_tree = null;
            CommonTree string_literal13_tree = null;
            CommonTree STRING14_tree = null;
            CommonTree char_literal15_tree = null;
            RewriteRuleITokenStream stream_67 = new RewriteRuleITokenStream(adaptor, "token 67");
            RewriteRuleITokenStream stream_66 = new RewriteRuleITokenStream(adaptor, "token 66");
            RewriteRuleITokenStream stream_69 = new RewriteRuleITokenStream(adaptor, "token 69");
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_STRING = new RewriteRuleITokenStream(adaptor, "token STRING");

            paraphrases.Push("in library using declaration");
            try
            {
                DebugEnterRule(GrammarFileName, "library");
                DebugLocation(237, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 3)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:240:2: ( '#' 'import' STRING ';' -> ^( USING_NODE STRING ) | '#' 'include' STRING ';' -> ^( USING_NODE STRING ) )
                    int alt3 = 2;
                    try
                    {
                        DebugEnterDecision(3, decisionCanBacktrack[3]);
                        int LA3_0 = input.LA(1);

                        if ((LA3_0 == 66))
                        {
                            int LA3_1 = input.LA(2);

                            if ((LA3_1 == 67))
                            {
                                alt3 = 1;
                            }
                            else if ((LA3_1 == 69))
                            {
                                alt3 = 2;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                NoViableAltException nvae = new NoViableAltException("", 3, 1, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 3, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(3); }
                    switch (alt3)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:240:4: '#' 'import' STRING ';'
                            {
                                DebugLocation(240, 4);
                                char_literal8 = (IToken)Match(input, 66, Follow._66_in_library386); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_66.Add(char_literal8);

                                DebugLocation(240, 8);
                                string_literal9 = (IToken)Match(input, 67, Follow._67_in_library388); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_67.Add(string_literal9);

                                DebugLocation(240, 17);
                                STRING10 = (IToken)Match(input, STRING, Follow._STRING_in_library390); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_STRING.Add(STRING10);

                                DebugLocation(240, 24);
                                if (state.backtracking == 0)
                                {
                                    PAT.Common.Ultility.ParsingUltility.LoadStandardLib(STRING10, Spec.FilePath);
                                }
                                DebugLocation(240, 103);
                                char_literal11 = (IToken)Match(input, 68, Follow._68_in_library394); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal11);



                                {
                                    // AST REWRITE
                                    // elements: STRING
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 240:107: -> ^( USING_NODE STRING )
                                        {
                                            DebugLocation(240, 110);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:240:110: ^( USING_NODE STRING )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(240, 112);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(USING_NODE, "USING_NODE"), root_1);

                                                DebugLocation(240, 123);
                                                adaptor.AddChild(root_1, stream_STRING.NextNode());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:241:4: '#' 'include' STRING ';'
                            {
                                DebugLocation(241, 4);
                                char_literal12 = (IToken)Match(input, 66, Follow._66_in_library407); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_66.Add(char_literal12);

                                DebugLocation(241, 8);
                                string_literal13 = (IToken)Match(input, 69, Follow._69_in_library409); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_69.Add(string_literal13);

                                DebugLocation(241, 18);
                                STRING14 = (IToken)Match(input, STRING, Follow._STRING_in_library411); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_STRING.Add(STRING14);

                                DebugLocation(241, 25);
                                if (state.backtracking == 0)
                                {
                                    PAT.Common.Ultility.ParsingUltility.LoadIncludeModel(STRING14, Spec);
                                }
                                DebugLocation(241, 96);
                                char_literal15 = (IToken)Match(input, 68, Follow._68_in_library415); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal15);



                                {
                                    // AST REWRITE
                                    // elements: STRING
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 241:100: -> ^( USING_NODE STRING )
                                        {
                                            DebugLocation(241, 103);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:241:103: ^( USING_NODE STRING )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(241, 105);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(USING_NODE, "USING_NODE"), root_1);

                                                DebugLocation(241, 116);
                                                adaptor.AddChild(root_1, stream_STRING.NextNode());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("library", 3);
                    LeaveRule("library", 3);
                    Leave_library();
                    if (state.backtracking > 0) { Memoize(input, 3, library_StartIndex); }
                }
                DebugLocation(242, 1);
            }
            finally { DebugExitRule(GrammarFileName, "library"); }
            return retval;

        }
        // $ANTLR end "library"

        public class assertion_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_assertion();
        partial void Leave_assertion();

        // $ANTLR start "assertion"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:267:1: assertion : '#' 'assert' definitionRef ( ( '|=' ( '(' | ')' | '[]' | '<>' | ID | STRING | '!' | '?' | '&&' | '||' | 'tau' | '->' | '<->' | '/\\\\' | '\\\\/' | '.' | INT )+ ) | 'deadlockfree' | 'nonterminating' | 'divergencefree' | 'deterministic' | 'reaches' ID ( withClause )? | 'refines' definitionRef | 'refines' '<F>' definitionRef | 'refines' '<FD>' definitionRef ) ';' ;
        [GrammarRule("assertion")]
        private PNTreeParser.assertion_return assertion()
        {
            Enter_assertion();
            EnterRule("assertion", 4);
            TraceIn("assertion", 4);
            PNTreeParser.assertion_return retval = new PNTreeParser.assertion_return();
            retval.Start = (IToken)input.LT(1);
            int assertion_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal16 = null;
            IToken string_literal17 = null;
            IToken string_literal19 = null;
            IToken set20 = null;
            IToken string_literal21 = null;
            IToken string_literal22 = null;
            IToken string_literal23 = null;
            IToken string_literal24 = null;
            IToken string_literal25 = null;
            IToken ID26 = null;
            IToken string_literal28 = null;
            IToken string_literal30 = null;
            IToken string_literal31 = null;
            IToken string_literal33 = null;
            IToken string_literal34 = null;
            IToken char_literal36 = null;
            PNTreeParser.definitionRef_return definitionRef18 = default(PNTreeParser.definitionRef_return);
            PNTreeParser.withClause_return withClause27 = default(PNTreeParser.withClause_return);
            PNTreeParser.definitionRef_return definitionRef29 = default(PNTreeParser.definitionRef_return);
            PNTreeParser.definitionRef_return definitionRef32 = default(PNTreeParser.definitionRef_return);
            PNTreeParser.definitionRef_return definitionRef35 = default(PNTreeParser.definitionRef_return);

            CommonTree char_literal16_tree = null;
            CommonTree string_literal17_tree = null;
            CommonTree string_literal19_tree = null;
            CommonTree set20_tree = null;
            CommonTree string_literal21_tree = null;
            CommonTree string_literal22_tree = null;
            CommonTree string_literal23_tree = null;
            CommonTree string_literal24_tree = null;
            CommonTree string_literal25_tree = null;
            CommonTree ID26_tree = null;
            CommonTree string_literal28_tree = null;
            CommonTree string_literal30_tree = null;
            CommonTree string_literal31_tree = null;
            CommonTree string_literal33_tree = null;
            CommonTree string_literal34_tree = null;
            CommonTree char_literal36_tree = null;

            paraphrases.Push("in assertion declaration");
            try
            {
                DebugEnterRule(GrammarFileName, "assertion");
                DebugLocation(267, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 4)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:270:2: ( '#' 'assert' definitionRef ( ( '|=' ( '(' | ')' | '[]' | '<>' | ID | STRING | '!' | '?' | '&&' | '||' | 'tau' | '->' | '<->' | '/\\\\' | '\\\\/' | '.' | INT )+ ) | 'deadlockfree' | 'nonterminating' | 'divergencefree' | 'deterministic' | 'reaches' ID ( withClause )? | 'refines' definitionRef | 'refines' '<F>' definitionRef | 'refines' '<FD>' definitionRef ) ';' )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:270:4: '#' 'assert' definitionRef ( ( '|=' ( '(' | ')' | '[]' | '<>' | ID | STRING | '!' | '?' | '&&' | '||' | 'tau' | '->' | '<->' | '/\\\\' | '\\\\/' | '.' | INT )+ ) | 'deadlockfree' | 'nonterminating' | 'divergencefree' | 'deterministic' | 'reaches' ID ( withClause )? | 'refines' definitionRef | 'refines' '<F>' definitionRef | 'refines' '<FD>' definitionRef ) ';'
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(270, 7);
                        char_literal16 = (IToken)Match(input, 66, Follow._66_in_assertion457); if (state.failed) return retval;
                        DebugLocation(270, 9);
                        string_literal17 = (IToken)Match(input, 70, Follow._70_in_assertion460); if (state.failed) return retval;
                        if (state.backtracking == 0)
                        {
                            string_literal17_tree = (CommonTree)adaptor.Create(string_literal17);
                            adaptor.AddChild(root_0, string_literal17_tree);
                        }
                        DebugLocation(270, 18);
                        PushFollow(Follow._definitionRef_in_assertion462);
                        definitionRef18 = definitionRef();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, definitionRef18.Tree);
                        DebugLocation(271, 2);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:271:2: ( ( '|=' ( '(' | ')' | '[]' | '<>' | ID | STRING | '!' | '?' | '&&' | '||' | 'tau' | '->' | '<->' | '/\\\\' | '\\\\/' | '.' | INT )+ ) | 'deadlockfree' | 'nonterminating' | 'divergencefree' | 'deterministic' | 'reaches' ID ( withClause )? | 'refines' definitionRef | 'refines' '<F>' definitionRef | 'refines' '<FD>' definitionRef )
                        int alt6 = 9;
                        try
                        {
                            DebugEnterSubRule(6);
                            try
                            {
                                DebugEnterDecision(6, decisionCanBacktrack[6]);
                                try
                                {
                                    alt6 = dfa6.Predict(input);
                                }
                                catch (NoViableAltException nvae)
                                {
                                    DebugRecognitionException(nvae);
                                    throw;
                                }
                            }
                            finally { DebugExitDecision(6); }
                            switch (alt6)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:272:3: ( '|=' ( '(' | ')' | '[]' | '<>' | ID | STRING | '!' | '?' | '&&' | '||' | 'tau' | '->' | '<->' | '/\\\\' | '\\\\/' | '.' | INT )+ )
                                    {
                                        DebugLocation(272, 3);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:272:3: ( '|=' ( '(' | ')' | '[]' | '<>' | ID | STRING | '!' | '?' | '&&' | '||' | 'tau' | '->' | '<->' | '/\\\\' | '\\\\/' | '.' | INT )+ )
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:272:5: '|=' ( '(' | ')' | '[]' | '<>' | ID | STRING | '!' | '?' | '&&' | '||' | 'tau' | '->' | '<->' | '/\\\\' | '\\\\/' | '.' | INT )+
                                        {
                                            DebugLocation(272, 5);
                                            string_literal19 = (IToken)Match(input, 71, Follow._71_in_assertion472); if (state.failed) return retval;
                                            if (state.backtracking == 0)
                                            {
                                                string_literal19_tree = (CommonTree)adaptor.Create(string_literal19);
                                                adaptor.AddChild(root_0, string_literal19_tree);
                                            }
                                            DebugLocation(272, 10);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:272:10: ( '(' | ')' | '[]' | '<>' | ID | STRING | '!' | '?' | '&&' | '||' | 'tau' | '->' | '<->' | '/\\\\' | '\\\\/' | '.' | INT )+
                                            int cnt4 = 0;
                                            try
                                            {
                                                DebugEnterSubRule(4);
                                                while (true)
                                                {
                                                    int alt4 = 2;
                                                    try
                                                    {
                                                        DebugEnterDecision(4, decisionCanBacktrack[4]);
                                                        int LA4_0 = input.LA(1);

                                                        if (((LA4_0 >= STRING && LA4_0 <= INT) || (LA4_0 >= 72 && LA4_0 <= 85)))
                                                        {
                                                            alt4 = 1;
                                                        }


                                                    }
                                                    finally { DebugExitDecision(4); }
                                                    switch (alt4)
                                                    {
                                                        case 1:
                                                            DebugEnterAlt(1);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:
                                                            {
                                                                DebugLocation(272, 10);
                                                                set20 = (IToken)input.LT(1);
                                                                if ((input.LA(1) >= STRING && input.LA(1) <= INT) || (input.LA(1) >= 72 && input.LA(1) <= 85))
                                                                {
                                                                    input.Consume();
                                                                    if (state.backtracking == 0) adaptor.AddChild(root_0, (CommonTree)adaptor.Create(set20));
                                                                    state.errorRecovery = false; state.failed = false;
                                                                }
                                                                else
                                                                {
                                                                    if (state.backtracking > 0) { state.failed = true; return retval; }
                                                                    MismatchedSetException mse = new MismatchedSetException(null, input);
                                                                    DebugRecognitionException(mse);
                                                                    throw mse;
                                                                }


                                                            }
                                                            break;

                                                        default:
                                                            if (cnt4 >= 1)
                                                                goto loop4;

                                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                                            EarlyExitException eee4 = new EarlyExitException(4, input);
                                                            DebugRecognitionException(eee4);
                                                            throw eee4;
                                                    }
                                                    cnt4++;
                                                }
                                            loop4:
                                                ;

                                            }
                                            finally { DebugExitSubRule(4); }


                                        }


                                    }
                                    break;
                                case 2:
                                    DebugEnterAlt(2);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:273:7: 'deadlockfree'
                                    {
                                        DebugLocation(273, 7);
                                        string_literal21 = (IToken)Match(input, 86, Follow._86_in_assertion552); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal21_tree = (CommonTree)adaptor.Create(string_literal21);
                                            adaptor.AddChild(root_0, string_literal21_tree);
                                        }

                                    }
                                    break;
                                case 3:
                                    DebugEnterAlt(3);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:274:7: 'nonterminating'
                                    {
                                        DebugLocation(274, 7);
                                        string_literal22 = (IToken)Match(input, 87, Follow._87_in_assertion562); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal22_tree = (CommonTree)adaptor.Create(string_literal22);
                                            adaptor.AddChild(root_0, string_literal22_tree);
                                        }

                                    }
                                    break;
                                case 4:
                                    DebugEnterAlt(4);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:275:7: 'divergencefree'
                                    {
                                        DebugLocation(275, 7);
                                        string_literal23 = (IToken)Match(input, 88, Follow._88_in_assertion575); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal23_tree = (CommonTree)adaptor.Create(string_literal23);
                                            adaptor.AddChild(root_0, string_literal23_tree);
                                        }

                                    }
                                    break;
                                case 5:
                                    DebugEnterAlt(5);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:276:7: 'deterministic'
                                    {
                                        DebugLocation(276, 7);
                                        string_literal24 = (IToken)Match(input, 89, Follow._89_in_assertion588); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal24_tree = (CommonTree)adaptor.Create(string_literal24);
                                            adaptor.AddChild(root_0, string_literal24_tree);
                                        }

                                    }
                                    break;
                                case 6:
                                    DebugEnterAlt(6);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:277:7: 'reaches' ID ( withClause )?
                                    {
                                        DebugLocation(277, 7);
                                        string_literal25 = (IToken)Match(input, 90, Follow._90_in_assertion596); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal25_tree = (CommonTree)adaptor.Create(string_literal25);
                                            adaptor.AddChild(root_0, string_literal25_tree);
                                        }
                                        DebugLocation(277, 17);
                                        ID26 = (IToken)Match(input, ID, Follow._ID_in_assertion598); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            ID26_tree = (CommonTree)adaptor.Create(ID26);
                                            adaptor.AddChild(root_0, ID26_tree);
                                        }
                                        DebugLocation(277, 20);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:277:20: ( withClause )?
                                        int alt5 = 2;
                                        try
                                        {
                                            DebugEnterSubRule(5);
                                            try
                                            {
                                                DebugEnterDecision(5, decisionCanBacktrack[5]);
                                                int LA5_0 = input.LA(1);

                                                if ((LA5_0 == 94))
                                                {
                                                    alt5 = 1;
                                                }
                                            }
                                            finally { DebugExitDecision(5); }
                                            switch (alt5)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: withClause
                                                    {
                                                        DebugLocation(277, 20);
                                                        PushFollow(Follow._withClause_in_assertion600);
                                                        withClause27 = withClause();
                                                        PopFollow();
                                                        if (state.failed) return retval;
                                                        if (state.backtracking == 0) adaptor.AddChild(root_0, withClause27.Tree);

                                                    }
                                                    break;

                                            }
                                        }
                                        finally { DebugExitSubRule(5); }


                                    }
                                    break;
                                case 7:
                                    DebugEnterAlt(7);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:278:7: 'refines' definitionRef
                                    {
                                        DebugLocation(278, 7);
                                        string_literal28 = (IToken)Match(input, 91, Follow._91_in_assertion609); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal28_tree = (CommonTree)adaptor.Create(string_literal28);
                                            adaptor.AddChild(root_0, string_literal28_tree);
                                        }
                                        DebugLocation(278, 17);
                                        PushFollow(Follow._definitionRef_in_assertion611);
                                        definitionRef29 = definitionRef();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) adaptor.AddChild(root_0, definitionRef29.Tree);

                                    }
                                    break;
                                case 8:
                                    DebugEnterAlt(8);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:279:7: 'refines' '<F>' definitionRef
                                    {
                                        DebugLocation(279, 7);
                                        string_literal30 = (IToken)Match(input, 91, Follow._91_in_assertion620); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal30_tree = (CommonTree)adaptor.Create(string_literal30);
                                            adaptor.AddChild(root_0, string_literal30_tree);
                                        }
                                        DebugLocation(279, 17);
                                        string_literal31 = (IToken)Match(input, 92, Follow._92_in_assertion622); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal31_tree = (CommonTree)adaptor.Create(string_literal31);
                                            adaptor.AddChild(root_0, string_literal31_tree);
                                        }
                                        DebugLocation(279, 23);
                                        PushFollow(Follow._definitionRef_in_assertion624);
                                        definitionRef32 = definitionRef();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) adaptor.AddChild(root_0, definitionRef32.Tree);

                                    }
                                    break;
                                case 9:
                                    DebugEnterAlt(9);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:280:7: 'refines' '<FD>' definitionRef
                                    {
                                        DebugLocation(280, 7);
                                        string_literal33 = (IToken)Match(input, 91, Follow._91_in_assertion633); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal33_tree = (CommonTree)adaptor.Create(string_literal33);
                                            adaptor.AddChild(root_0, string_literal33_tree);
                                        }
                                        DebugLocation(280, 17);
                                        string_literal34 = (IToken)Match(input, 93, Follow._93_in_assertion635); if (state.failed) return retval;
                                        if (state.backtracking == 0)
                                        {
                                            string_literal34_tree = (CommonTree)adaptor.Create(string_literal34);
                                            adaptor.AddChild(root_0, string_literal34_tree);
                                        }
                                        DebugLocation(280, 24);
                                        PushFollow(Follow._definitionRef_in_assertion637);
                                        definitionRef35 = definitionRef();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) adaptor.AddChild(root_0, definitionRef35.Tree);

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(6); }

                        DebugLocation(285, 5);
                        char_literal36 = (IToken)Match(input, 68, Follow._68_in_assertion647); if (state.failed) return retval;

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("assertion", 4);
                    LeaveRule("assertion", 4);
                    Leave_assertion();
                    if (state.backtracking > 0) { Memoize(input, 4, assertion_StartIndex); }
                }
                DebugLocation(286, 1);
            }
            finally { DebugExitRule(GrammarFileName, "assertion"); }
            return retval;

        }
        // $ANTLR end "assertion"

        public class withClause_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_withClause();
        partial void Leave_withClause();

        // $ANTLR start "withClause"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:288:1: withClause : 'with' value= ( 'min' | 'max' ) '(' expression ')' ;
        [GrammarRule("withClause")]
        private PNTreeParser.withClause_return withClause()
        {
            Enter_withClause();
            EnterRule("withClause", 5);
            TraceIn("withClause", 5);
            PNTreeParser.withClause_return retval = new PNTreeParser.withClause_return();
            retval.Start = (IToken)input.LT(1);
            int withClause_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken value = null;
            IToken string_literal37 = null;
            IToken char_literal38 = null;
            IToken char_literal40 = null;
            PNTreeParser.expression_return expression39 = default(PNTreeParser.expression_return);

            CommonTree value_tree = null;
            CommonTree string_literal37_tree = null;
            CommonTree char_literal38_tree = null;
            CommonTree char_literal40_tree = null;

            paraphrases.Push("in with clause");
            try
            {
                DebugEnterRule(GrammarFileName, "withClause");
                DebugLocation(288, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 5)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:291:2: ( 'with' value= ( 'min' | 'max' ) '(' expression ')' )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:291:4: 'with' value= ( 'min' | 'max' ) '(' expression ')'
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(291, 10);
                        string_literal37 = (IToken)Match(input, 94, Follow._94_in_withClause671); if (state.failed) return retval;
                        if (state.backtracking == 0)
                        {
                            string_literal37_tree = (CommonTree)adaptor.Create(string_literal37);
                            root_0 = (CommonTree)adaptor.BecomeRoot(string_literal37_tree, root_0);
                        }
                        DebugLocation(291, 17);
                        value = (IToken)input.LT(1);
                        if ((input.LA(1) >= 95 && input.LA(1) <= 96))
                        {
                            input.Consume();
                            if (state.backtracking == 0) adaptor.AddChild(root_0, (CommonTree)adaptor.Create(value));
                            state.errorRecovery = false; state.failed = false;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            MismatchedSetException mse = new MismatchedSetException(null, input);
                            DebugRecognitionException(mse);
                            throw mse;
                        }

                        DebugLocation(291, 37);
                        char_literal38 = (IToken)Match(input, 72, Follow._72_in_withClause684); if (state.failed) return retval;
                        DebugLocation(291, 39);
                        PushFollow(Follow._expression_in_withClause687);
                        expression39 = expression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, expression39.Tree);
                        DebugLocation(291, 53);
                        char_literal40 = (IToken)Match(input, 73, Follow._73_in_withClause689); if (state.failed) return retval;

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("withClause", 5);
                    LeaveRule("withClause", 5);
                    Leave_withClause();
                    if (state.backtracking > 0) { Memoize(input, 5, withClause_StartIndex); }
                }
                DebugLocation(292, 1);
            }
            finally { DebugExitRule(GrammarFileName, "withClause"); }
            return retval;

        }
        // $ANTLR end "withClause"

        public class definitionRef_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_definitionRef();
        partial void Leave_definitionRef();

        // $ANTLR start "definitionRef"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:294:1: definitionRef : ID ( '(' ( expression ( ',' expression )* )? ')' )? -> ^( DEFINITION_REF_NODE ID ( expression )* ) ;
        [GrammarRule("definitionRef")]
        private PNTreeParser.definitionRef_return definitionRef()
        {
            Enter_definitionRef();
            EnterRule("definitionRef", 6);
            TraceIn("definitionRef", 6);
            PNTreeParser.definitionRef_return retval = new PNTreeParser.definitionRef_return();
            retval.Start = (IToken)input.LT(1);
            int definitionRef_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken ID41 = null;
            IToken char_literal42 = null;
            IToken char_literal44 = null;
            IToken char_literal46 = null;
            PNTreeParser.expression_return expression43 = default(PNTreeParser.expression_return);
            PNTreeParser.expression_return expression45 = default(PNTreeParser.expression_return);

            CommonTree ID41_tree = null;
            CommonTree char_literal42_tree = null;
            CommonTree char_literal44_tree = null;
            CommonTree char_literal46_tree = null;
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            try
            {
                DebugEnterRule(GrammarFileName, "definitionRef");
                DebugLocation(294, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 6)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:2: ( ID ( '(' ( expression ( ',' expression )* )? ')' )? -> ^( DEFINITION_REF_NODE ID ( expression )* ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:4: ID ( '(' ( expression ( ',' expression )* )? ')' )?
                    {
                        DebugLocation(295, 4);
                        ID41 = (IToken)Match(input, ID, Follow._ID_in_definitionRef701); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_ID.Add(ID41);

                        DebugLocation(295, 7);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:7: ( '(' ( expression ( ',' expression )* )? ')' )?
                        int alt9 = 2;
                        try
                        {
                            DebugEnterSubRule(9);
                            try
                            {
                                DebugEnterDecision(9, decisionCanBacktrack[9]);
                                int LA9_0 = input.LA(1);

                                if ((LA9_0 == 72))
                                {
                                    alt9 = 1;
                                }
                            }
                            finally { DebugExitDecision(9); }
                            switch (alt9)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:8: '(' ( expression ( ',' expression )* )? ')'
                                    {
                                        DebugLocation(295, 8);
                                        char_literal42 = (IToken)Match(input, 72, Follow._72_in_definitionRef704); if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_72.Add(char_literal42);

                                        DebugLocation(295, 12);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:12: ( expression ( ',' expression )* )?
                                        int alt8 = 2;
                                        try
                                        {
                                            DebugEnterSubRule(8);
                                            try
                                            {
                                                DebugEnterDecision(8, decisionCanBacktrack[8]);
                                                int LA8_0 = input.LA(1);

                                                if (((LA8_0 >= ID && LA8_0 <= INT) || LA8_0 == 72 || LA8_0 == 76 || (LA8_0 >= 102 && LA8_0 <= 104) || LA8_0 == 120 || (LA8_0 >= 126 && LA8_0 <= 127)))
                                                {
                                                    alt8 = 1;
                                                }
                                            }
                                            finally { DebugExitDecision(8); }
                                            switch (alt8)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:13: expression ( ',' expression )*
                                                    {
                                                        DebugLocation(295, 13);
                                                        PushFollow(Follow._expression_in_definitionRef707);
                                                        expression43 = expression();
                                                        PopFollow();
                                                        if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_expression.Add(expression43.Tree);
                                                        DebugLocation(295, 24);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:24: ( ',' expression )*
                                                        try
                                                        {
                                                            DebugEnterSubRule(7);
                                                            while (true)
                                                            {
                                                                int alt7 = 2;
                                                                try
                                                                {
                                                                    DebugEnterDecision(7, decisionCanBacktrack[7]);
                                                                    int LA7_0 = input.LA(1);

                                                                    if ((LA7_0 == 97))
                                                                    {
                                                                        alt7 = 1;
                                                                    }


                                                                }
                                                                finally { DebugExitDecision(7); }
                                                                switch (alt7)
                                                                {
                                                                    case 1:
                                                                        DebugEnterAlt(1);
                                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:25: ',' expression
                                                                        {
                                                                            DebugLocation(295, 25);
                                                                            char_literal44 = (IToken)Match(input, 97, Follow._97_in_definitionRef710); if (state.failed) return retval;
                                                                            if (state.backtracking == 0) stream_97.Add(char_literal44);

                                                                            DebugLocation(295, 29);
                                                                            PushFollow(Follow._expression_in_definitionRef712);
                                                                            expression45 = expression();
                                                                            PopFollow();
                                                                            if (state.failed) return retval;
                                                                            if (state.backtracking == 0) stream_expression.Add(expression45.Tree);

                                                                        }
                                                                        break;

                                                                    default:
                                                                        goto loop7;
                                                                }
                                                            }

                                                        loop7:
                                                            ;

                                                        }
                                                        finally { DebugExitSubRule(7); }


                                                    }
                                                    break;

                                            }
                                        }
                                        finally { DebugExitSubRule(8); }

                                        DebugLocation(295, 46);
                                        char_literal46 = (IToken)Match(input, 73, Follow._73_in_definitionRef720); if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_73.Add(char_literal46);


                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(9); }



                        {
                            // AST REWRITE
                            // elements: expression, ID
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 295:52: -> ^( DEFINITION_REF_NODE ID ( expression )* )
                                {
                                    DebugLocation(295, 55);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:55: ^( DEFINITION_REF_NODE ID ( expression )* )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(295, 57);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(DEFINITION_REF_NODE, "DEFINITION_REF_NODE"), root_1);

                                        DebugLocation(295, 77);
                                        adaptor.AddChild(root_1, stream_ID.NextNode());
                                        DebugLocation(295, 80);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:295:80: ( expression )*
                                        while (stream_expression.HasNext)
                                        {
                                            DebugLocation(295, 80);
                                            adaptor.AddChild(root_1, stream_expression.NextTree());

                                        }
                                        stream_expression.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("definitionRef", 6);
                    LeaveRule("definitionRef", 6);
                    Leave_definitionRef();
                    if (state.backtracking > 0) { Memoize(input, 6, definitionRef_StartIndex); }
                }
                DebugLocation(296, 1);
            }
            finally { DebugExitRule(GrammarFileName, "definitionRef"); }
            return retval;

        }
        // $ANTLR end "definitionRef"

        public class alphabet_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_alphabet();
        partial void Leave_alphabet();

        // $ANTLR start "alphabet"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:298:1: alphabet : '#' 'alphabet' ID '{' eventName ( ',' eventName )* '}' ';' -> ^( ALPHABET_NOTE ID ( eventName )+ ) ;
        [GrammarRule("alphabet")]
        private PNTreeParser.alphabet_return alphabet()
        {
            Enter_alphabet();
            EnterRule("alphabet", 7);
            TraceIn("alphabet", 7);
            PNTreeParser.alphabet_return retval = new PNTreeParser.alphabet_return();
            retval.Start = (IToken)input.LT(1);
            int alphabet_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal47 = null;
            IToken string_literal48 = null;
            IToken ID49 = null;
            IToken char_literal50 = null;
            IToken char_literal52 = null;
            IToken char_literal54 = null;
            IToken char_literal55 = null;
            PNTreeParser.eventName_return eventName51 = default(PNTreeParser.eventName_return);
            PNTreeParser.eventName_return eventName53 = default(PNTreeParser.eventName_return);

            CommonTree char_literal47_tree = null;
            CommonTree string_literal48_tree = null;
            CommonTree ID49_tree = null;
            CommonTree char_literal50_tree = null;
            CommonTree char_literal52_tree = null;
            CommonTree char_literal54_tree = null;
            CommonTree char_literal55_tree = null;
            RewriteRuleITokenStream stream_98 = new RewriteRuleITokenStream(adaptor, "token 98");
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_66 = new RewriteRuleITokenStream(adaptor, "token 66");
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_eventName = new RewriteRuleSubtreeStream(adaptor, "rule eventName");

            paraphrases.Push("in alphabet declaration");

            try
            {
                DebugEnterRule(GrammarFileName, "alphabet");
                DebugLocation(298, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 7)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:303:2: ( '#' 'alphabet' ID '{' eventName ( ',' eventName )* '}' ';' -> ^( ALPHABET_NOTE ID ( eventName )+ ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:303:4: '#' 'alphabet' ID '{' eventName ( ',' eventName )* '}' ';'
                    {
                        DebugLocation(303, 4);
                        char_literal47 = (IToken)Match(input, 66, Follow._66_in_alphabet759); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_66.Add(char_literal47);

                        DebugLocation(303, 8);
                        string_literal48 = (IToken)Match(input, 98, Follow._98_in_alphabet761); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_98.Add(string_literal48);

                        DebugLocation(303, 19);
                        ID49 = (IToken)Match(input, ID, Follow._ID_in_alphabet763); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_ID.Add(ID49);

                        DebugLocation(303, 23);
                        char_literal50 = (IToken)Match(input, 99, Follow._99_in_alphabet766); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_99.Add(char_literal50);

                        DebugLocation(303, 27);
                        PushFollow(Follow._eventName_in_alphabet768);
                        eventName51 = eventName();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_eventName.Add(eventName51.Tree);
                        DebugLocation(303, 38);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:303:38: ( ',' eventName )*
                        try
                        {
                            DebugEnterSubRule(10);
                            while (true)
                            {
                                int alt10 = 2;
                                try
                                {
                                    DebugEnterDecision(10, decisionCanBacktrack[10]);
                                    int LA10_0 = input.LA(1);

                                    if ((LA10_0 == 97))
                                    {
                                        alt10 = 1;
                                    }


                                }
                                finally { DebugExitDecision(10); }
                                switch (alt10)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:303:39: ',' eventName
                                        {
                                            DebugLocation(303, 39);
                                            char_literal52 = (IToken)Match(input, 97, Follow._97_in_alphabet772); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_97.Add(char_literal52);

                                            DebugLocation(303, 43);
                                            PushFollow(Follow._eventName_in_alphabet774);
                                            eventName53 = eventName();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_eventName.Add(eventName53.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop10;
                                }
                            }

                        loop10:
                            ;

                        }
                        finally { DebugExitSubRule(10); }

                        DebugLocation(303, 56);
                        char_literal54 = (IToken)Match(input, 100, Follow._100_in_alphabet779); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_100.Add(char_literal54);

                        DebugLocation(303, 60);
                        char_literal55 = (IToken)Match(input, 68, Follow._68_in_alphabet781); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_68.Add(char_literal55);



                        {
                            // AST REWRITE
                            // elements: eventName, ID
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 303:65: -> ^( ALPHABET_NOTE ID ( eventName )+ )
                                {
                                    DebugLocation(303, 69);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:303:69: ^( ALPHABET_NOTE ID ( eventName )+ )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(303, 71);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(ALPHABET_NOTE, "ALPHABET_NOTE"), root_1);

                                        DebugLocation(303, 85);
                                        adaptor.AddChild(root_1, stream_ID.NextNode());
                                        DebugLocation(303, 88);
                                        if (!(stream_eventName.HasNext))
                                        {
                                            throw new RewriteEarlyExitException();
                                        }
                                        while (stream_eventName.HasNext)
                                        {
                                            DebugLocation(303, 88);
                                            adaptor.AddChild(root_1, stream_eventName.NextTree());

                                        }
                                        stream_eventName.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("alphabet", 7);
                    LeaveRule("alphabet", 7);
                    Leave_alphabet();
                    if (state.backtracking > 0) { Memoize(input, 7, alphabet_StartIndex); }
                }
                DebugLocation(304, 1);
            }
            finally { DebugExitRule(GrammarFileName, "alphabet"); }
            return retval;

        }
        // $ANTLR end "alphabet"

        public class define_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_define();
        partial void Leave_define();

        // $ANTLR start "define"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:306:1: define : ( '#' 'define' ID ( '-' )? INT ';' -> ^( DEFINE_CONSTANT_NODE ID INT ( '-' )? ) | '#' 'define' ID ( 'true' ';' -> ^( DEFINE_CONSTANT_NODE ID 'true' ) | 'false' ';' -> ^( DEFINE_CONSTANT_NODE ID 'false' ) ) | 'enum' '{' a= ID ( ',' b= ID )* '}' ';' -> ^( DEFINE_CONSTANT_NODE ( ID )+ ) | '#' 'define' ID ( dparameter )? dstatement ';' -> ^( DEFINE_NODE ID ( dparameter )? dstatement ) );
        [GrammarRule("define")]
        private PNTreeParser.define_return define()
        {
            Enter_define();
            EnterRule("define", 8);
            TraceIn("define", 8);
            PNTreeParser.define_return retval = new PNTreeParser.define_return();
            retval.Start = (IToken)input.LT(1);
            int define_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken a = null;
            IToken b = null;
            IToken char_literal56 = null;
            IToken string_literal57 = null;
            IToken ID58 = null;
            IToken char_literal59 = null;
            IToken INT60 = null;
            IToken char_literal61 = null;
            IToken char_literal62 = null;
            IToken string_literal63 = null;
            IToken ID64 = null;
            IToken string_literal65 = null;
            IToken char_literal66 = null;
            IToken string_literal67 = null;
            IToken char_literal68 = null;
            IToken string_literal69 = null;
            IToken char_literal70 = null;
            IToken char_literal71 = null;
            IToken char_literal72 = null;
            IToken char_literal73 = null;
            IToken char_literal74 = null;
            IToken string_literal75 = null;
            IToken ID76 = null;
            IToken char_literal79 = null;
            PNTreeParser.dparameter_return dparameter77 = default(PNTreeParser.dparameter_return);
            PNTreeParser.dstatement_return dstatement78 = default(PNTreeParser.dstatement_return);

            CommonTree a_tree = null;
            CommonTree b_tree = null;
            CommonTree char_literal56_tree = null;
            CommonTree string_literal57_tree = null;
            CommonTree ID58_tree = null;
            CommonTree char_literal59_tree = null;
            CommonTree INT60_tree = null;
            CommonTree char_literal61_tree = null;
            CommonTree char_literal62_tree = null;
            CommonTree string_literal63_tree = null;
            CommonTree ID64_tree = null;
            CommonTree string_literal65_tree = null;
            CommonTree char_literal66_tree = null;
            CommonTree string_literal67_tree = null;
            CommonTree char_literal68_tree = null;
            CommonTree string_literal69_tree = null;
            CommonTree char_literal70_tree = null;
            CommonTree char_literal71_tree = null;
            CommonTree char_literal72_tree = null;
            CommonTree char_literal73_tree = null;
            CommonTree char_literal74_tree = null;
            CommonTree string_literal75_tree = null;
            CommonTree ID76_tree = null;
            CommonTree char_literal79_tree = null;
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_66 = new RewriteRuleITokenStream(adaptor, "token 66");
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_INT = new RewriteRuleITokenStream(adaptor, "token INT");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_105 = new RewriteRuleITokenStream(adaptor, "token 105");
            RewriteRuleITokenStream stream_104 = new RewriteRuleITokenStream(adaptor, "token 104");
            RewriteRuleITokenStream stream_103 = new RewriteRuleITokenStream(adaptor, "token 103");
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_102 = new RewriteRuleITokenStream(adaptor, "token 102");
            RewriteRuleITokenStream stream_101 = new RewriteRuleITokenStream(adaptor, "token 101");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_dparameter = new RewriteRuleSubtreeStream(adaptor, "rule dparameter");
            RewriteRuleSubtreeStream stream_dstatement = new RewriteRuleSubtreeStream(adaptor, "rule dstatement");
            paraphrases.Push("in constant/enum/process variable/(LTL state condition) definition");

            try
            {
                DebugEnterRule(GrammarFileName, "define");
                DebugLocation(306, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 8)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:310:2: ( '#' 'define' ID ( '-' )? INT ';' -> ^( DEFINE_CONSTANT_NODE ID INT ( '-' )? ) | '#' 'define' ID ( 'true' ';' -> ^( DEFINE_CONSTANT_NODE ID 'true' ) | 'false' ';' -> ^( DEFINE_CONSTANT_NODE ID 'false' ) ) | 'enum' '{' a= ID ( ',' b= ID )* '}' ';' -> ^( DEFINE_CONSTANT_NODE ( ID )+ ) | '#' 'define' ID ( dparameter )? dstatement ';' -> ^( DEFINE_NODE ID ( dparameter )? dstatement ) )
                    int alt15 = 4;
                    try
                    {
                        DebugEnterDecision(15, decisionCanBacktrack[15]);
                        try
                        {
                            alt15 = dfa15.Predict(input);
                        }
                        catch (NoViableAltException nvae)
                        {
                            DebugRecognitionException(nvae);
                            throw;
                        }
                    }
                    finally { DebugExitDecision(15); }
                    switch (alt15)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:310:4: '#' 'define' ID ( '-' )? INT ';'
                            {
                                DebugLocation(310, 4);
                                char_literal56 = (IToken)Match(input, 66, Follow._66_in_define816); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_66.Add(char_literal56);

                                DebugLocation(310, 8);
                                string_literal57 = (IToken)Match(input, 101, Follow._101_in_define818); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_101.Add(string_literal57);

                                DebugLocation(310, 17);
                                ID58 = (IToken)Match(input, ID, Follow._ID_in_define820); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID58);

                                DebugLocation(310, 20);
                                if (state.backtracking == 0)
                                {
                                    GlobalConstNames.Add(ID58);
                                }
                                DebugLocation(310, 49);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:310:49: ( '-' )?
                                int alt11 = 2;
                                try
                                {
                                    DebugEnterSubRule(11);
                                    try
                                    {
                                        DebugEnterDecision(11, decisionCanBacktrack[11]);
                                        int LA11_0 = input.LA(1);

                                        if ((LA11_0 == 102))
                                        {
                                            alt11 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(11); }
                                    switch (alt11)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: '-'
                                            {
                                                DebugLocation(310, 49);
                                                char_literal59 = (IToken)Match(input, 102, Follow._102_in_define824); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_102.Add(char_literal59);


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(11); }

                                DebugLocation(310, 54);
                                INT60 = (IToken)Match(input, INT, Follow._INT_in_define827); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_INT.Add(INT60);

                                DebugLocation(310, 58);
                                char_literal61 = (IToken)Match(input, 68, Follow._68_in_define829); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal61);



                                {
                                    // AST REWRITE
                                    // elements: ID, INT, 102
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 310:62: -> ^( DEFINE_CONSTANT_NODE ID INT ( '-' )? )
                                        {
                                            DebugLocation(310, 65);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:310:65: ^( DEFINE_CONSTANT_NODE ID INT ( '-' )? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(310, 67);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(DEFINE_CONSTANT_NODE, "DEFINE_CONSTANT_NODE"), root_1);

                                                DebugLocation(310, 88);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(310, 91);
                                                adaptor.AddChild(root_1, stream_INT.NextNode());
                                                DebugLocation(310, 95);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:310:95: ( '-' )?
                                                if (stream_102.HasNext)
                                                {
                                                    DebugLocation(310, 95);
                                                    adaptor.AddChild(root_1, stream_102.NextNode());

                                                }
                                                stream_102.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:311:4: '#' 'define' ID ( 'true' ';' -> ^( DEFINE_CONSTANT_NODE ID 'true' ) | 'false' ';' -> ^( DEFINE_CONSTANT_NODE ID 'false' ) )
                            {
                                DebugLocation(311, 4);
                                char_literal62 = (IToken)Match(input, 66, Follow._66_in_define847); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_66.Add(char_literal62);

                                DebugLocation(311, 8);
                                string_literal63 = (IToken)Match(input, 101, Follow._101_in_define849); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_101.Add(string_literal63);

                                DebugLocation(311, 17);
                                ID64 = (IToken)Match(input, ID, Follow._ID_in_define851); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID64);

                                DebugLocation(311, 20);
                                if (state.backtracking == 0)
                                {
                                    GlobalConstNames.Add(ID64);
                                }
                                DebugLocation(311, 49);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:311:49: ( 'true' ';' -> ^( DEFINE_CONSTANT_NODE ID 'true' ) | 'false' ';' -> ^( DEFINE_CONSTANT_NODE ID 'false' ) )
                                int alt12 = 2;
                                try
                                {
                                    DebugEnterSubRule(12);
                                    try
                                    {
                                        DebugEnterDecision(12, decisionCanBacktrack[12]);
                                        int LA12_0 = input.LA(1);

                                        if ((LA12_0 == 103))
                                        {
                                            alt12 = 1;
                                        }
                                        else if ((LA12_0 == 104))
                                        {
                                            alt12 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 12, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(12); }
                                    switch (alt12)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:311:50: 'true' ';'
                                            {
                                                DebugLocation(311, 50);
                                                string_literal65 = (IToken)Match(input, 103, Follow._103_in_define856); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_103.Add(string_literal65);

                                                DebugLocation(311, 57);
                                                char_literal66 = (IToken)Match(input, 68, Follow._68_in_define858); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_68.Add(char_literal66);



                                                {
                                                    // AST REWRITE
                                                    // elements: 103, ID
                                                    // token labels: 
                                                    // rule labels: retval
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 311:62: -> ^( DEFINE_CONSTANT_NODE ID 'true' )
                                                        {
                                                            DebugLocation(311, 65);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:311:65: ^( DEFINE_CONSTANT_NODE ID 'true' )
                                                            {
                                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                                DebugLocation(311, 67);
                                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(DEFINE_CONSTANT_NODE, "DEFINE_CONSTANT_NODE"), root_1);

                                                                DebugLocation(311, 88);
                                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                                DebugLocation(311, 91);
                                                                adaptor.AddChild(root_1, stream_103.NextNode());

                                                                adaptor.AddChild(root_0, root_1);
                                                            }

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:312:10: 'false' ';'
                                            {
                                                DebugLocation(312, 10);
                                                string_literal67 = (IToken)Match(input, 104, Follow._104_in_define880); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_104.Add(string_literal67);

                                                DebugLocation(312, 18);
                                                char_literal68 = (IToken)Match(input, 68, Follow._68_in_define882); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_68.Add(char_literal68);



                                                {
                                                    // AST REWRITE
                                                    // elements: 104, ID
                                                    // token labels: 
                                                    // rule labels: retval
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 312:22: -> ^( DEFINE_CONSTANT_NODE ID 'false' )
                                                        {
                                                            DebugLocation(312, 25);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:312:25: ^( DEFINE_CONSTANT_NODE ID 'false' )
                                                            {
                                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                                DebugLocation(312, 27);
                                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(DEFINE_CONSTANT_NODE, "DEFINE_CONSTANT_NODE"), root_1);

                                                                DebugLocation(312, 48);
                                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                                DebugLocation(312, 51);
                                                                adaptor.AddChild(root_1, stream_104.NextNode());

                                                                adaptor.AddChild(root_0, root_1);
                                                            }

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(12); }


                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:313:4: 'enum' '{' a= ID ( ',' b= ID )* '}' ';'
                            {
                                DebugLocation(313, 4);
                                string_literal69 = (IToken)Match(input, 105, Follow._105_in_define899); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_105.Add(string_literal69);

                                DebugLocation(313, 11);
                                char_literal70 = (IToken)Match(input, 99, Follow._99_in_define901); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_99.Add(char_literal70);

                                DebugLocation(313, 16);
                                a = (IToken)Match(input, ID, Follow._ID_in_define905); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(a);

                                DebugLocation(313, 20);
                                if (state.backtracking == 0)
                                {
                                    GlobalConstNames.Add(a);
                                }
                                DebugLocation(313, 48);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:313:48: ( ',' b= ID )*
                                try
                                {
                                    DebugEnterSubRule(13);
                                    while (true)
                                    {
                                        int alt13 = 2;
                                        try
                                        {
                                            DebugEnterDecision(13, decisionCanBacktrack[13]);
                                            int LA13_0 = input.LA(1);

                                            if ((LA13_0 == 97))
                                            {
                                                alt13 = 1;
                                            }


                                        }
                                        finally { DebugExitDecision(13); }
                                        switch (alt13)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:313:49: ',' b= ID
                                                {
                                                    DebugLocation(313, 49);
                                                    char_literal71 = (IToken)Match(input, 97, Follow._97_in_define910); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_97.Add(char_literal71);

                                                    DebugLocation(313, 54);
                                                    b = (IToken)Match(input, ID, Follow._ID_in_define914); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_ID.Add(b);

                                                    DebugLocation(313, 58);
                                                    if (state.backtracking == 0)
                                                    {
                                                        GlobalConstNames.Add(b);
                                                    }

                                                }
                                                break;

                                            default:
                                                goto loop13;
                                        }
                                    }

                                loop13:
                                    ;

                                }
                                finally { DebugExitSubRule(13); }

                                DebugLocation(313, 88);
                                char_literal72 = (IToken)Match(input, 100, Follow._100_in_define920); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_100.Add(char_literal72);

                                DebugLocation(313, 93);
                                char_literal73 = (IToken)Match(input, 68, Follow._68_in_define923); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal73);



                                {
                                    // AST REWRITE
                                    // elements: ID
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 313:97: -> ^( DEFINE_CONSTANT_NODE ( ID )+ )
                                        {
                                            DebugLocation(313, 100);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:313:100: ^( DEFINE_CONSTANT_NODE ( ID )+ )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(313, 102);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(DEFINE_CONSTANT_NODE, "DEFINE_CONSTANT_NODE"), root_1);

                                                DebugLocation(313, 123);
                                                if (!(stream_ID.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_ID.HasNext)
                                                {
                                                    DebugLocation(313, 123);
                                                    adaptor.AddChild(root_1, stream_ID.NextNode());

                                                }
                                                stream_ID.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 4:
                            DebugEnterAlt(4);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:314:4: '#' 'define' ID ( dparameter )? dstatement ';'
                            {
                                DebugLocation(314, 4);
                                char_literal74 = (IToken)Match(input, 66, Follow._66_in_define937); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_66.Add(char_literal74);

                                DebugLocation(314, 8);
                                string_literal75 = (IToken)Match(input, 101, Follow._101_in_define939); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_101.Add(string_literal75);

                                DebugLocation(314, 17);
                                ID76 = (IToken)Match(input, ID, Follow._ID_in_define941); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID76);

                                DebugLocation(314, 20);
                                if (state.backtracking == 0)
                                {
                                    LTLStatePropertyNames.Add(ID76);
                                }
                                DebugLocation(314, 54);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:314:54: ( dparameter )?
                                int alt14 = 2;
                                try
                                {
                                    DebugEnterSubRule(14);
                                    try
                                    {
                                        DebugEnterDecision(14, decisionCanBacktrack[14]);
                                        try
                                        {
                                            alt14 = dfa14.Predict(input);
                                        }
                                        catch (NoViableAltException nvae)
                                        {
                                            DebugRecognitionException(nvae);
                                            throw;
                                        }
                                    }
                                    finally { DebugExitDecision(14); }
                                    switch (alt14)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: dparameter
                                            {
                                                DebugLocation(314, 54);
                                                PushFollow(Follow._dparameter_in_define945);
                                                dparameter77 = dparameter();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_dparameter.Add(dparameter77.Tree);

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(14); }

                                DebugLocation(314, 66);
                                PushFollow(Follow._dstatement_in_define948);
                                dstatement78 = dstatement();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_dstatement.Add(dstatement78.Tree);
                                DebugLocation(314, 77);
                                char_literal79 = (IToken)Match(input, 68, Follow._68_in_define950); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal79);



                                {
                                    // AST REWRITE
                                    // elements: dstatement, ID, dparameter
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 314:81: -> ^( DEFINE_NODE ID ( dparameter )? dstatement )
                                        {
                                            DebugLocation(314, 84);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:314:84: ^( DEFINE_NODE ID ( dparameter )? dstatement )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(314, 86);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(DEFINE_NODE, "DEFINE_NODE"), root_1);

                                                DebugLocation(314, 98);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(314, 101);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:314:101: ( dparameter )?
                                                if (stream_dparameter.HasNext)
                                                {
                                                    DebugLocation(314, 101);
                                                    adaptor.AddChild(root_1, stream_dparameter.NextTree());

                                                }
                                                stream_dparameter.Reset();
                                                DebugLocation(314, 113);
                                                adaptor.AddChild(root_1, stream_dstatement.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("define", 8);
                    LeaveRule("define", 8);
                    Leave_define();
                    if (state.backtracking > 0) { Memoize(input, 8, define_StartIndex); }
                }
                DebugLocation(316, 1);
            }
            finally { DebugExitRule(GrammarFileName, "define"); }
            return retval;

        }
        // $ANTLR end "define"

        public class dparameter_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_dparameter();
        partial void Leave_dparameter();

        // $ANTLR start "dparameter"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:318:1: dparameter : '(' ID ( ',' ID )* ')' -> ^( DPARAMETER_NODE ( ID )+ ) ;
        [GrammarRule("dparameter")]
        private PNTreeParser.dparameter_return dparameter()
        {
            Enter_dparameter();
            EnterRule("dparameter", 9);
            TraceIn("dparameter", 9);
            PNTreeParser.dparameter_return retval = new PNTreeParser.dparameter_return();
            retval.Start = (IToken)input.LT(1);
            int dparameter_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal80 = null;
            IToken ID81 = null;
            IToken char_literal82 = null;
            IToken ID83 = null;
            IToken char_literal84 = null;

            CommonTree char_literal80_tree = null;
            CommonTree ID81_tree = null;
            CommonTree char_literal82_tree = null;
            CommonTree ID83_tree = null;
            CommonTree char_literal84_tree = null;
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");

            try
            {
                DebugEnterRule(GrammarFileName, "dparameter");
                DebugLocation(318, 8);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 9)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:319:9: ( '(' ID ( ',' ID )* ')' -> ^( DPARAMETER_NODE ( ID )+ ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:319:12: '(' ID ( ',' ID )* ')'
                    {
                        DebugLocation(319, 12);
                        char_literal80 = (IToken)Match(input, 72, Follow._72_in_dparameter985); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_72.Add(char_literal80);

                        DebugLocation(319, 16);
                        ID81 = (IToken)Match(input, ID, Follow._ID_in_dparameter987); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_ID.Add(ID81);

                        DebugLocation(319, 19);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:319:19: ( ',' ID )*
                        try
                        {
                            DebugEnterSubRule(16);
                            while (true)
                            {
                                int alt16 = 2;
                                try
                                {
                                    DebugEnterDecision(16, decisionCanBacktrack[16]);
                                    int LA16_0 = input.LA(1);

                                    if ((LA16_0 == 97))
                                    {
                                        alt16 = 1;
                                    }


                                }
                                finally { DebugExitDecision(16); }
                                switch (alt16)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:319:20: ',' ID
                                        {
                                            DebugLocation(319, 20);
                                            char_literal82 = (IToken)Match(input, 97, Follow._97_in_dparameter990); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_97.Add(char_literal82);

                                            DebugLocation(319, 24);
                                            ID83 = (IToken)Match(input, ID, Follow._ID_in_dparameter992); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_ID.Add(ID83);


                                        }
                                        break;

                                    default:
                                        goto loop16;
                                }
                            }

                        loop16:
                            ;

                        }
                        finally { DebugExitSubRule(16); }

                        DebugLocation(319, 30);
                        char_literal84 = (IToken)Match(input, 73, Follow._73_in_dparameter997); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_73.Add(char_literal84);



                        {
                            // AST REWRITE
                            // elements: ID
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 319:34: -> ^( DPARAMETER_NODE ( ID )+ )
                                {
                                    DebugLocation(319, 37);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:319:37: ^( DPARAMETER_NODE ( ID )+ )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(319, 39);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(DPARAMETER_NODE, "DPARAMETER_NODE"), root_1);

                                        DebugLocation(319, 55);
                                        if (!(stream_ID.HasNext))
                                        {
                                            throw new RewriteEarlyExitException();
                                        }
                                        while (stream_ID.HasNext)
                                        {
                                            DebugLocation(319, 55);
                                            adaptor.AddChild(root_1, stream_ID.NextNode());

                                        }
                                        stream_ID.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("dparameter", 9);
                    LeaveRule("dparameter", 9);
                    Leave_dparameter();
                    if (state.backtracking > 0) { Memoize(input, 9, dparameter_StartIndex); }
                }
                DebugLocation(320, 8);
            }
            finally { DebugExitRule(GrammarFileName, "dparameter"); }
            return retval;

        }
        // $ANTLR end "dparameter"

        public class dstatement_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_dstatement();
        partial void Leave_dstatement();

        // $ANTLR start "dstatement"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:322:1: dstatement : ( block | expression );
        [GrammarRule("dstatement")]
        private PNTreeParser.dstatement_return dstatement()
        {
            Enter_dstatement();
            EnterRule("dstatement", 10);
            TraceIn("dstatement", 10);
            PNTreeParser.dstatement_return retval = new PNTreeParser.dstatement_return();
            retval.Start = (IToken)input.LT(1);
            int dstatement_StartIndex = input.Index;
            CommonTree root_0 = null;

            PNTreeParser.block_return block85 = default(PNTreeParser.block_return);
            PNTreeParser.expression_return expression86 = default(PNTreeParser.expression_return);


            try
            {
                DebugEnterRule(GrammarFileName, "dstatement");
                DebugLocation(322, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 10)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:323:2: ( block | expression )
                    int alt17 = 2;
                    try
                    {
                        DebugEnterDecision(17, decisionCanBacktrack[17]);
                        int LA17_0 = input.LA(1);

                        if ((LA17_0 == 99))
                        {
                            alt17 = 1;
                        }
                        else if (((LA17_0 >= ID && LA17_0 <= INT) || LA17_0 == 72 || LA17_0 == 76 || (LA17_0 >= 102 && LA17_0 <= 104) || LA17_0 == 120 || (LA17_0 >= 126 && LA17_0 <= 127)))
                        {
                            alt17 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 17, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(17); }
                    switch (alt17)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:323:4: block
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(323, 4);
                                PushFollow(Follow._block_in_dstatement1024);
                                block85 = block();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, block85.Tree);

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:326:4: expression
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(326, 4);
                                PushFollow(Follow._expression_in_dstatement1033);
                                expression86 = expression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, expression86.Tree);

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("dstatement", 10);
                    LeaveRule("dstatement", 10);
                    Leave_dstatement();
                    if (state.backtracking > 0) { Memoize(input, 10, dstatement_StartIndex); }
                }
                DebugLocation(327, 1);
            }
            finally { DebugExitRule(GrammarFileName, "dstatement"); }
            return retval;

        }
        // $ANTLR end "dstatement"

        public class block_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_block();
        partial void Leave_block();

        // $ANTLR start "block"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:330:1: block : b= '{' (s= statement )* (e= expression )? '}' -> ^( BLOCK_NODE ( statement )* ( expression )? ) ;
        [GrammarRule("block")]
        private PNTreeParser.block_return block()
        {
            Enter_block();
            EnterRule("block", 11);
            TraceIn("block", 11);
            PNTreeParser.block_return retval = new PNTreeParser.block_return();
            retval.Start = (IToken)input.LT(1);
            int block_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken b = null;
            IToken char_literal87 = null;
            PNTreeParser.statement_return s = default(PNTreeParser.statement_return);
            PNTreeParser.expression_return e = default(PNTreeParser.expression_return);

            CommonTree b_tree = null;
            CommonTree char_literal87_tree = null;
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_statement = new RewriteRuleSubtreeStream(adaptor, "rule statement");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            bool hasValidStatement = false;
            try
            {
                DebugEnterRule(GrammarFileName, "block");
                DebugLocation(330, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 11)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:337:2: (b= '{' (s= statement )* (e= expression )? '}' -> ^( BLOCK_NODE ( statement )* ( expression )? ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:337:4: b= '{' (s= statement )* (e= expression )? '}'
                    {
                        DebugLocation(337, 5);
                        b = (IToken)Match(input, 99, Follow._99_in_block1059); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_99.Add(b);

                        DebugLocation(337, 10);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:337:10: (s= statement )*
                        try
                        {
                            DebugEnterSubRule(18);
                            while (true)
                            {
                                int alt18 = 2;
                                try
                                {
                                    DebugEnterDecision(18, decisionCanBacktrack[18]);
                                    try
                                    {
                                        alt18 = dfa18.Predict(input);
                                    }
                                    catch (NoViableAltException nvae)
                                    {
                                        DebugRecognitionException(nvae);
                                        throw;
                                    }
                                }
                                finally { DebugExitDecision(18); }
                                switch (alt18)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:337:11: s= statement
                                        {
                                            DebugLocation(337, 12);
                                            PushFollow(Follow._statement_in_block1064);
                                            s = statement();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_statement.Add(s.Tree);
                                            DebugLocation(337, 23);
                                            if (state.backtracking == 0)
                                            {
                                                PAT.Common.Ultility.ParsingUltility.IsStateAValidOneForBlock(s, s.Tree); if (s != null && s.Tree != null) hasValidStatement = true;
                                            }

                                        }
                                        break;

                                    default:
                                        goto loop18;
                                }
                            }

                        loop18:
                            ;

                        }
                        finally { DebugExitSubRule(18); }

                        DebugLocation(338, 2);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:338:2: (e= expression )?
                        int alt19 = 2;
                        try
                        {
                            DebugEnterSubRule(19);
                            try
                            {
                                DebugEnterDecision(19, decisionCanBacktrack[19]);
                                int LA19_0 = input.LA(1);

                                if (((LA19_0 >= ID && LA19_0 <= INT) || LA19_0 == 72 || LA19_0 == 76 || (LA19_0 >= 102 && LA19_0 <= 104) || LA19_0 == 120 || (LA19_0 >= 126 && LA19_0 <= 127)))
                                {
                                    alt19 = 1;
                                }
                            }
                            finally { DebugExitDecision(19); }
                            switch (alt19)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:338:3: e= expression
                                    {
                                        DebugLocation(338, 4);
                                        PushFollow(Follow._expression_in_block1075);
                                        e = expression();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_expression.Add(e.Tree);
                                        DebugLocation(338, 17);
                                        if (state.backtracking == 0)
                                        {
                                            PAT.Common.Ultility.ParsingUltility.IsStateAValidOneForExpression(e, e.Tree);
                                        }

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(19); }

                        DebugLocation(338, 99);
                        char_literal87 = (IToken)Match(input, 100, Follow._100_in_block1082); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_100.Add(char_literal87);

                        DebugLocation(339, 2);
                        if (state.backtracking == 0)
                        {
                            if (!hasValidStatement && (e == null || e.Tree == null)) { throw new ParsingException("At least one expression is needed in the expression block.", b); }
                        }


                        {
                            // AST REWRITE
                            // elements: expression, statement
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 340:2: -> ^( BLOCK_NODE ( statement )* ( expression )? )
                                {
                                    DebugLocation(340, 6);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:340:6: ^( BLOCK_NODE ( statement )* ( expression )? )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(340, 8);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(BLOCK_NODE, "BLOCK_NODE"), root_1);

                                        DebugLocation(340, 19);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:340:19: ( statement )*
                                        while (stream_statement.HasNext)
                                        {
                                            DebugLocation(340, 19);
                                            adaptor.AddChild(root_1, stream_statement.NextTree());

                                        }
                                        stream_statement.Reset();
                                        DebugLocation(340, 30);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:340:30: ( expression )?
                                        if (stream_expression.HasNext)
                                        {
                                            DebugLocation(340, 30);
                                            adaptor.AddChild(root_1, stream_expression.NextTree());

                                        }
                                        stream_expression.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("block", 11);
                    LeaveRule("block", 11);
                    Leave_block();
                    if (state.backtracking > 0) { Memoize(input, 11, block_StartIndex); }
                }
                DebugLocation(341, 1);
            }
            finally { DebugExitRule(GrammarFileName, "block"); }
            return retval;

        }
        // $ANTLR end "block"

        public class statement_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_statement();
        partial void Leave_statement();

        // $ANTLR start "statement"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:343:1: statement : ( block | localVariableDeclaration | ifExpression | whileExpression | e= expression ';' | ';' );
        [GrammarRule("statement")]
        private PNTreeParser.statement_return statement()
        {
            Enter_statement();
            EnterRule("statement", 12);
            TraceIn("statement", 12);
            PNTreeParser.statement_return retval = new PNTreeParser.statement_return();
            retval.Start = (IToken)input.LT(1);
            int statement_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal92 = null;
            IToken char_literal93 = null;
            PNTreeParser.expression_return e = default(PNTreeParser.expression_return);
            PNTreeParser.block_return block88 = default(PNTreeParser.block_return);
            PNTreeParser.localVariableDeclaration_return localVariableDeclaration89 = default(PNTreeParser.localVariableDeclaration_return);
            PNTreeParser.ifExpression_return ifExpression90 = default(PNTreeParser.ifExpression_return);
            PNTreeParser.whileExpression_return whileExpression91 = default(PNTreeParser.whileExpression_return);

            CommonTree char_literal92_tree = null;
            CommonTree char_literal93_tree = null;

            try
            {
                DebugEnterRule(GrammarFileName, "statement");
                DebugLocation(343, 5);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 12)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:344:6: ( block | localVariableDeclaration | ifExpression | whileExpression | e= expression ';' | ';' )
                    int alt20 = 6;
                    try
                    {
                        DebugEnterDecision(20, decisionCanBacktrack[20]);
                        switch (input.LA(1))
                        {
                            case 99:
                                {
                                    alt20 = 1;
                                }
                                break;
                            case 106:
                                {
                                    alt20 = 2;
                                }
                                break;
                            case 131:
                                {
                                    alt20 = 3;
                                }
                                break;
                            case 133:
                                {
                                    alt20 = 4;
                                }
                                break;
                            case ID:
                            case INT:
                            case 72:
                            case 76:
                            case 102:
                            case 103:
                            case 104:
                            case 120:
                            case 126:
                            case 127:
                                {
                                    alt20 = 5;
                                }
                                break;
                            case 68:
                                {
                                    alt20 = 6;
                                }
                                break;
                            default:
                                {
                                    if (state.backtracking > 0) { state.failed = true; return retval; }
                                    NoViableAltException nvae = new NoViableAltException("", 20, 0, input);

                                    DebugRecognitionException(nvae);
                                    throw nvae;
                                }
                        }

                    }
                    finally { DebugExitDecision(20); }
                    switch (alt20)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:344:8: block
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(344, 8);
                                PushFollow(Follow._block_in_statement1116);
                                block88 = block();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, block88.Tree);

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:348:8: localVariableDeclaration
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(348, 8);
                                PushFollow(Follow._localVariableDeclaration_in_statement1143);
                                localVariableDeclaration89 = localVariableDeclaration();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, localVariableDeclaration89.Tree);

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:349:8: ifExpression
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(349, 8);
                                PushFollow(Follow._ifExpression_in_statement1152);
                                ifExpression90 = ifExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, ifExpression90.Tree);

                            }
                            break;
                        case 4:
                            DebugEnterAlt(4);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:350:8: whileExpression
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(350, 8);
                                PushFollow(Follow._whileExpression_in_statement1161);
                                whileExpression91 = whileExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, whileExpression91.Tree);

                            }
                            break;
                        case 5:
                            DebugEnterAlt(5);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:351:8: e= expression ';'
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(351, 9);
                                PushFollow(Follow._expression_in_statement1172);
                                e = expression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, e.Tree);
                                DebugLocation(351, 24);
                                char_literal92 = (IToken)Match(input, 68, Follow._68_in_statement1174); if (state.failed) return retval;
                                DebugLocation(351, 27);
                                if (state.backtracking == 0)
                                {
                                    PAT.Common.Ultility.ParsingUltility.IsStateAValidOneForExpression(e, e.Tree);
                                }

                            }
                            break;
                        case 6:
                            DebugEnterAlt(6);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:352:8: ';'
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(352, 11);
                                char_literal93 = (IToken)Match(input, 68, Follow._68_in_statement1187); if (state.failed) return retval;

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("statement", 12);
                    LeaveRule("statement", 12);
                    Leave_statement();
                    if (state.backtracking > 0) { Memoize(input, 12, statement_StartIndex); }
                }
                DebugLocation(353, 5);
            }
            finally { DebugExitRule(GrammarFileName, "statement"); }
            return retval;

        }
        // $ANTLR end "statement"

        public class localVariableDeclaration_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_localVariableDeclaration();
        partial void Leave_localVariableDeclaration();

        // $ANTLR start "localVariableDeclaration"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:355:1: localVariableDeclaration : ( 'var' ID ( '=' expression )? ';' -> ^( LOCAL_VAR_NODE ID ( expression )? ) | 'var' ID '=' recordExpression ';' -> ^( LOCAL_VAR_NODE ID recordExpression ) | 'var' ID ( '[' expression ']' )+ ( '=' recordExpression )? ';' -> ^( LOCAL_ARRAY_NODE ID ( expression )+ ( recordExpression )? ) );
        [GrammarRule("localVariableDeclaration")]
        private PNTreeParser.localVariableDeclaration_return localVariableDeclaration()
        {
            Enter_localVariableDeclaration();
            EnterRule("localVariableDeclaration", 13);
            TraceIn("localVariableDeclaration", 13);
            PNTreeParser.localVariableDeclaration_return retval = new PNTreeParser.localVariableDeclaration_return();
            retval.Start = (IToken)input.LT(1);
            int localVariableDeclaration_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal94 = null;
            IToken ID95 = null;
            IToken char_literal96 = null;
            IToken char_literal98 = null;
            IToken string_literal99 = null;
            IToken ID100 = null;
            IToken char_literal101 = null;
            IToken char_literal103 = null;
            IToken string_literal104 = null;
            IToken ID105 = null;
            IToken char_literal106 = null;
            IToken char_literal108 = null;
            IToken char_literal109 = null;
            IToken char_literal111 = null;
            PNTreeParser.expression_return expression97 = default(PNTreeParser.expression_return);
            PNTreeParser.recordExpression_return recordExpression102 = default(PNTreeParser.recordExpression_return);
            PNTreeParser.expression_return expression107 = default(PNTreeParser.expression_return);
            PNTreeParser.recordExpression_return recordExpression110 = default(PNTreeParser.recordExpression_return);

            CommonTree string_literal94_tree = null;
            CommonTree ID95_tree = null;
            CommonTree char_literal96_tree = null;
            CommonTree char_literal98_tree = null;
            CommonTree string_literal99_tree = null;
            CommonTree ID100_tree = null;
            CommonTree char_literal101_tree = null;
            CommonTree char_literal103_tree = null;
            CommonTree string_literal104_tree = null;
            CommonTree ID105_tree = null;
            CommonTree char_literal106_tree = null;
            CommonTree char_literal108_tree = null;
            CommonTree char_literal109_tree = null;
            CommonTree char_literal111_tree = null;
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_109 = new RewriteRuleITokenStream(adaptor, "token 109");
            RewriteRuleITokenStream stream_108 = new RewriteRuleITokenStream(adaptor, "token 108");
            RewriteRuleITokenStream stream_107 = new RewriteRuleITokenStream(adaptor, "token 107");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_106 = new RewriteRuleITokenStream(adaptor, "token 106");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            RewriteRuleSubtreeStream stream_recordExpression = new RewriteRuleSubtreeStream(adaptor, "rule recordExpression");
            try
            {
                DebugEnterRule(GrammarFileName, "localVariableDeclaration");
                DebugLocation(355, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 13)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:356:2: ( 'var' ID ( '=' expression )? ';' -> ^( LOCAL_VAR_NODE ID ( expression )? ) | 'var' ID '=' recordExpression ';' -> ^( LOCAL_VAR_NODE ID recordExpression ) | 'var' ID ( '[' expression ']' )+ ( '=' recordExpression )? ';' -> ^( LOCAL_ARRAY_NODE ID ( expression )+ ( recordExpression )? ) )
                    int alt24 = 3;
                    try
                    {
                        DebugEnterDecision(24, decisionCanBacktrack[24]);
                        int LA24_0 = input.LA(1);

                        if ((LA24_0 == 106))
                        {
                            int LA24_1 = input.LA(2);

                            if ((LA24_1 == ID))
                            {
                                switch (input.LA(3))
                                {
                                    case 107:
                                        {
                                            int LA24_3 = input.LA(4);

                                            if ((LA24_3 == 108))
                                            {
                                                alt24 = 2;
                                            }
                                            else if (((LA24_3 >= ID && LA24_3 <= INT) || LA24_3 == 72 || LA24_3 == 76 || (LA24_3 >= 102 && LA24_3 <= 104) || LA24_3 == 120 || (LA24_3 >= 126 && LA24_3 <= 127)))
                                            {
                                                alt24 = 1;
                                            }
                                            else
                                            {
                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                NoViableAltException nvae = new NoViableAltException("", 24, 3, input);

                                                DebugRecognitionException(nvae);
                                                throw nvae;
                                            }
                                        }
                                        break;
                                    case 68:
                                        {
                                            alt24 = 1;
                                        }
                                        break;
                                    case 108:
                                        {
                                            alt24 = 3;
                                        }
                                        break;
                                    default:
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 24, 2, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                }

                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                NoViableAltException nvae = new NoViableAltException("", 24, 1, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 24, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(24); }
                    switch (alt24)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:356:4: 'var' ID ( '=' expression )? ';'
                            {
                                DebugLocation(356, 4);
                                string_literal94 = (IToken)Match(input, 106, Follow._106_in_localVariableDeclaration1205); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_106.Add(string_literal94);

                                DebugLocation(356, 10);
                                ID95 = (IToken)Match(input, ID, Follow._ID_in_localVariableDeclaration1207); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID95);

                                DebugLocation(356, 13);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:356:13: ( '=' expression )?
                                int alt21 = 2;
                                try
                                {
                                    DebugEnterSubRule(21);
                                    try
                                    {
                                        DebugEnterDecision(21, decisionCanBacktrack[21]);
                                        int LA21_0 = input.LA(1);

                                        if ((LA21_0 == 107))
                                        {
                                            alt21 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(21); }
                                    switch (alt21)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:356:14: '=' expression
                                            {
                                                DebugLocation(356, 14);
                                                char_literal96 = (IToken)Match(input, 107, Follow._107_in_localVariableDeclaration1210); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_107.Add(char_literal96);

                                                DebugLocation(356, 18);
                                                PushFollow(Follow._expression_in_localVariableDeclaration1212);
                                                expression97 = expression();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_expression.Add(expression97.Tree);

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(21); }

                                DebugLocation(356, 31);
                                char_literal98 = (IToken)Match(input, 68, Follow._68_in_localVariableDeclaration1216); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal98);



                                {
                                    // AST REWRITE
                                    // elements: expression, ID
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 356:35: -> ^( LOCAL_VAR_NODE ID ( expression )? )
                                        {
                                            DebugLocation(356, 38);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:356:38: ^( LOCAL_VAR_NODE ID ( expression )? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(356, 40);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(LOCAL_VAR_NODE, "LOCAL_VAR_NODE"), root_1);

                                                DebugLocation(356, 55);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(356, 58);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:356:58: ( expression )?
                                                if (stream_expression.HasNext)
                                                {
                                                    DebugLocation(356, 58);
                                                    adaptor.AddChild(root_1, stream_expression.NextTree());

                                                }
                                                stream_expression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:357:4: 'var' ID '=' recordExpression ';'
                            {
                                DebugLocation(357, 4);
                                string_literal99 = (IToken)Match(input, 106, Follow._106_in_localVariableDeclaration1233); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_106.Add(string_literal99);

                                DebugLocation(357, 10);
                                ID100 = (IToken)Match(input, ID, Follow._ID_in_localVariableDeclaration1235); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID100);

                                DebugLocation(357, 13);
                                char_literal101 = (IToken)Match(input, 107, Follow._107_in_localVariableDeclaration1237); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_107.Add(char_literal101);

                                DebugLocation(357, 17);
                                PushFollow(Follow._recordExpression_in_localVariableDeclaration1239);
                                recordExpression102 = recordExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_recordExpression.Add(recordExpression102.Tree);
                                DebugLocation(357, 34);
                                char_literal103 = (IToken)Match(input, 68, Follow._68_in_localVariableDeclaration1241); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal103);



                                {
                                    // AST REWRITE
                                    // elements: ID, recordExpression
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 357:38: -> ^( LOCAL_VAR_NODE ID recordExpression )
                                        {
                                            DebugLocation(357, 41);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:357:41: ^( LOCAL_VAR_NODE ID recordExpression )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(357, 43);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(LOCAL_VAR_NODE, "LOCAL_VAR_NODE"), root_1);

                                                DebugLocation(357, 58);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(357, 61);
                                                adaptor.AddChild(root_1, stream_recordExpression.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:358:4: 'var' ID ( '[' expression ']' )+ ( '=' recordExpression )? ';'
                            {
                                DebugLocation(358, 4);
                                string_literal104 = (IToken)Match(input, 106, Follow._106_in_localVariableDeclaration1256); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_106.Add(string_literal104);

                                DebugLocation(358, 10);
                                ID105 = (IToken)Match(input, ID, Follow._ID_in_localVariableDeclaration1258); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID105);

                                DebugLocation(358, 13);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:358:13: ( '[' expression ']' )+
                                int cnt22 = 0;
                                try
                                {
                                    DebugEnterSubRule(22);
                                    while (true)
                                    {
                                        int alt22 = 2;
                                        try
                                        {
                                            DebugEnterDecision(22, decisionCanBacktrack[22]);
                                            int LA22_0 = input.LA(1);

                                            if ((LA22_0 == 108))
                                            {
                                                alt22 = 1;
                                            }


                                        }
                                        finally { DebugExitDecision(22); }
                                        switch (alt22)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:358:14: '[' expression ']'
                                                {
                                                    DebugLocation(358, 14);
                                                    char_literal106 = (IToken)Match(input, 108, Follow._108_in_localVariableDeclaration1261); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_108.Add(char_literal106);

                                                    DebugLocation(358, 18);
                                                    PushFollow(Follow._expression_in_localVariableDeclaration1263);
                                                    expression107 = expression();
                                                    PopFollow();
                                                    if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_expression.Add(expression107.Tree);
                                                    DebugLocation(358, 29);
                                                    char_literal108 = (IToken)Match(input, 109, Follow._109_in_localVariableDeclaration1265); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_109.Add(char_literal108);


                                                }
                                                break;

                                            default:
                                                if (cnt22 >= 1)
                                                    goto loop22;

                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                EarlyExitException eee22 = new EarlyExitException(22, input);
                                                DebugRecognitionException(eee22);
                                                throw eee22;
                                        }
                                        cnt22++;
                                    }
                                loop22:
                                    ;

                                }
                                finally { DebugExitSubRule(22); }

                                DebugLocation(358, 35);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:358:35: ( '=' recordExpression )?
                                int alt23 = 2;
                                try
                                {
                                    DebugEnterSubRule(23);
                                    try
                                    {
                                        DebugEnterDecision(23, decisionCanBacktrack[23]);
                                        int LA23_0 = input.LA(1);

                                        if ((LA23_0 == 107))
                                        {
                                            alt23 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(23); }
                                    switch (alt23)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:358:36: '=' recordExpression
                                            {
                                                DebugLocation(358, 36);
                                                char_literal109 = (IToken)Match(input, 107, Follow._107_in_localVariableDeclaration1270); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_107.Add(char_literal109);

                                                DebugLocation(358, 40);
                                                PushFollow(Follow._recordExpression_in_localVariableDeclaration1272);
                                                recordExpression110 = recordExpression();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_recordExpression.Add(recordExpression110.Tree);

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(23); }

                                DebugLocation(358, 59);
                                char_literal111 = (IToken)Match(input, 68, Follow._68_in_localVariableDeclaration1276); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal111);



                                {
                                    // AST REWRITE
                                    // elements: ID, recordExpression, expression
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 358:63: -> ^( LOCAL_ARRAY_NODE ID ( expression )+ ( recordExpression )? )
                                        {
                                            DebugLocation(358, 66);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:358:66: ^( LOCAL_ARRAY_NODE ID ( expression )+ ( recordExpression )? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(358, 68);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(LOCAL_ARRAY_NODE, "LOCAL_ARRAY_NODE"), root_1);

                                                DebugLocation(358, 85);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(358, 88);
                                                if (!(stream_expression.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_expression.HasNext)
                                                {
                                                    DebugLocation(358, 88);
                                                    adaptor.AddChild(root_1, stream_expression.NextTree());

                                                }
                                                stream_expression.Reset();
                                                DebugLocation(358, 100);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:358:100: ( recordExpression )?
                                                if (stream_recordExpression.HasNext)
                                                {
                                                    DebugLocation(358, 100);
                                                    adaptor.AddChild(root_1, stream_recordExpression.NextTree());

                                                }
                                                stream_recordExpression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("localVariableDeclaration", 13);
                    LeaveRule("localVariableDeclaration", 13);
                    Leave_localVariableDeclaration();
                    if (state.backtracking > 0) { Memoize(input, 13, localVariableDeclaration_StartIndex); }
                }
                DebugLocation(359, 1);
            }
            finally { DebugExitRule(GrammarFileName, "localVariableDeclaration"); }
            return retval;

        }
        // $ANTLR end "localVariableDeclaration"

        public class expression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_expression();
        partial void Leave_expression();

        // $ANTLR start "expression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:361:1: expression : conditionalOrExpression ( ( '=' expression ) -> ^( ASSIGNMENT_NODE conditionalOrExpression expression ) | -> conditionalOrExpression ) ;
        [GrammarRule("expression")]
        private PNTreeParser.expression_return expression()
        {
            Enter_expression();
            EnterRule("expression", 14);
            TraceIn("expression", 14);
            PNTreeParser.expression_return retval = new PNTreeParser.expression_return();
            retval.Start = (IToken)input.LT(1);
            int expression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal113 = null;
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression112 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.expression_return expression114 = default(PNTreeParser.expression_return);

            CommonTree char_literal113_tree = null;
            RewriteRuleITokenStream stream_107 = new RewriteRuleITokenStream(adaptor, "token 107");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            RewriteRuleSubtreeStream stream_conditionalOrExpression = new RewriteRuleSubtreeStream(adaptor, "rule conditionalOrExpression");
            paraphrases.Push("in expression");
            try
            {
                DebugEnterRule(GrammarFileName, "expression");
                DebugLocation(361, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 14)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:364:2: ( conditionalOrExpression ( ( '=' expression ) -> ^( ASSIGNMENT_NODE conditionalOrExpression expression ) | -> conditionalOrExpression ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:364:4: conditionalOrExpression ( ( '=' expression ) -> ^( ASSIGNMENT_NODE conditionalOrExpression expression ) | -> conditionalOrExpression )
                    {
                        DebugLocation(364, 4);
                        PushFollow(Follow._conditionalOrExpression_in_expression1317);
                        conditionalOrExpression112 = conditionalOrExpression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression112.Tree);
                        DebugLocation(365, 2);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:365:2: ( ( '=' expression ) -> ^( ASSIGNMENT_NODE conditionalOrExpression expression ) | -> conditionalOrExpression )
                        int alt25 = 2;
                        try
                        {
                            DebugEnterSubRule(25);
                            try
                            {
                                DebugEnterDecision(25, decisionCanBacktrack[25]);
                                int LA25_0 = input.LA(1);

                                if ((LA25_0 == 107))
                                {
                                    alt25 = 1;
                                }
                                else if ((LA25_0 == EOF || LA25_0 == 68 || (LA25_0 >= 72 && LA25_0 <= 73) || LA25_0 == 81 || LA25_0 == 85 || LA25_0 == 97 || LA25_0 == 100 || LA25_0 == 109 || LA25_0 == 130))
                                {
                                    alt25 = 2;
                                }
                                else
                                {
                                    if (state.backtracking > 0) { state.failed = true; return retval; }
                                    NoViableAltException nvae = new NoViableAltException("", 25, 0, input);

                                    DebugRecognitionException(nvae);
                                    throw nvae;
                                }
                            }
                            finally { DebugExitDecision(25); }
                            switch (alt25)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:366:3: ( '=' expression )
                                    {
                                        DebugLocation(366, 3);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:366:3: ( '=' expression )
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:366:4: '=' expression
                                        {
                                            DebugLocation(366, 4);
                                            char_literal113 = (IToken)Match(input, 107, Follow._107_in_expression1327); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_107.Add(char_literal113);

                                            DebugLocation(366, 8);
                                            PushFollow(Follow._expression_in_expression1329);
                                            expression114 = expression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_expression.Add(expression114.Tree);

                                        }



                                        {
                                            // AST REWRITE
                                            // elements: conditionalOrExpression, expression
                                            // token labels: 
                                            // rule labels: retval
                                            // token list labels: 
                                            // rule list labels: 
                                            // wildcard labels: 
                                            if (state.backtracking == 0)
                                            {
                                                retval.Tree = root_0;
                                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                root_0 = (CommonTree)adaptor.Nil();
                                                // 366:20: -> ^( ASSIGNMENT_NODE conditionalOrExpression expression )
                                                {
                                                    DebugLocation(366, 23);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:366:23: ^( ASSIGNMENT_NODE conditionalOrExpression expression )
                                                    {
                                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                        DebugLocation(366, 25);
                                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(ASSIGNMENT_NODE, "ASSIGNMENT_NODE"), root_1);

                                                        DebugLocation(366, 41);
                                                        adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());
                                                        DebugLocation(366, 65);
                                                        adaptor.AddChild(root_1, stream_expression.NextTree());

                                                        adaptor.AddChild(root_0, root_1);
                                                    }

                                                }

                                                retval.Tree = root_0;
                                            }
                                        }

                                    }
                                    break;
                                case 2:
                                    DebugEnterAlt(2);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:367:5: 
                                    {

                                        {
                                            // AST REWRITE
                                            // elements: conditionalOrExpression
                                            // token labels: 
                                            // rule labels: retval
                                            // token list labels: 
                                            // rule list labels: 
                                            // wildcard labels: 
                                            if (state.backtracking == 0)
                                            {
                                                retval.Tree = root_0;
                                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                root_0 = (CommonTree)adaptor.Nil();
                                                // 367:5: -> conditionalOrExpression
                                                {
                                                    DebugLocation(367, 8);
                                                    adaptor.AddChild(root_0, stream_conditionalOrExpression.NextTree());

                                                }

                                                retval.Tree = root_0;
                                            }
                                        }

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(25); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("expression", 14);
                    LeaveRule("expression", 14);
                    Leave_expression();
                    if (state.backtracking > 0) { Memoize(input, 14, expression_StartIndex); }
                }
                DebugLocation(369, 1);
            }
            finally { DebugExitRule(GrammarFileName, "expression"); }
            return retval;

        }
        // $ANTLR end "expression"

        public class conditionalOrExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_conditionalOrExpression();
        partial void Leave_conditionalOrExpression();

        // $ANTLR start "conditionalOrExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:371:1: conditionalOrExpression : conditionalAndExpression ( '||' conditionalAndExpression )* ;
        [GrammarRule("conditionalOrExpression")]
        private PNTreeParser.conditionalOrExpression_return conditionalOrExpression()
        {
            Enter_conditionalOrExpression();
            EnterRule("conditionalOrExpression", 15);
            TraceIn("conditionalOrExpression", 15);
            PNTreeParser.conditionalOrExpression_return retval = new PNTreeParser.conditionalOrExpression_return();
            retval.Start = (IToken)input.LT(1);
            int conditionalOrExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal116 = null;
            PNTreeParser.conditionalAndExpression_return conditionalAndExpression115 = default(PNTreeParser.conditionalAndExpression_return);
            PNTreeParser.conditionalAndExpression_return conditionalAndExpression117 = default(PNTreeParser.conditionalAndExpression_return);

            CommonTree string_literal116_tree = null;

            paraphrases.Push("in || (logic or) expression");
            try
            {
                DebugEnterRule(GrammarFileName, "conditionalOrExpression");
                DebugLocation(371, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 15)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:375:6: ( conditionalAndExpression ( '||' conditionalAndExpression )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:375:8: conditionalAndExpression ( '||' conditionalAndExpression )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(375, 8);
                        PushFollow(Follow._conditionalAndExpression_in_conditionalOrExpression1382);
                        conditionalAndExpression115 = conditionalAndExpression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, conditionalAndExpression115.Tree);
                        DebugLocation(375, 33);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:375:33: ( '||' conditionalAndExpression )*
                        try
                        {
                            DebugEnterSubRule(26);
                            while (true)
                            {
                                int alt26 = 2;
                                try
                                {
                                    DebugEnterDecision(26, decisionCanBacktrack[26]);
                                    int LA26_0 = input.LA(1);

                                    if ((LA26_0 == 79))
                                    {
                                        alt26 = 1;
                                    }


                                }
                                finally { DebugExitDecision(26); }
                                switch (alt26)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:375:35: '||' conditionalAndExpression
                                        {
                                            DebugLocation(375, 39);
                                            string_literal116 = (IToken)Match(input, 79, Follow._79_in_conditionalOrExpression1386); if (state.failed) return retval;
                                            if (state.backtracking == 0)
                                            {
                                                string_literal116_tree = (CommonTree)adaptor.Create(string_literal116);
                                                root_0 = (CommonTree)adaptor.BecomeRoot(string_literal116_tree, root_0);
                                            }
                                            DebugLocation(375, 41);
                                            PushFollow(Follow._conditionalAndExpression_in_conditionalOrExpression1389);
                                            conditionalAndExpression117 = conditionalAndExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, conditionalAndExpression117.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop26;
                                }
                            }

                        loop26:
                            ;

                        }
                        finally { DebugExitSubRule(26); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("conditionalOrExpression", 15);
                    LeaveRule("conditionalOrExpression", 15);
                    Leave_conditionalOrExpression();
                    if (state.backtracking > 0) { Memoize(input, 15, conditionalOrExpression_StartIndex); }
                }
                DebugLocation(376, 1);
            }
            finally { DebugExitRule(GrammarFileName, "conditionalOrExpression"); }
            return retval;

        }
        // $ANTLR end "conditionalOrExpression"

        public class conditionalAndExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_conditionalAndExpression();
        partial void Leave_conditionalAndExpression();

        // $ANTLR start "conditionalAndExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:378:1: conditionalAndExpression : conditionalXorExpression ( '&&' conditionalXorExpression )* ;
        [GrammarRule("conditionalAndExpression")]
        private PNTreeParser.conditionalAndExpression_return conditionalAndExpression()
        {
            Enter_conditionalAndExpression();
            EnterRule("conditionalAndExpression", 16);
            TraceIn("conditionalAndExpression", 16);
            PNTreeParser.conditionalAndExpression_return retval = new PNTreeParser.conditionalAndExpression_return();
            retval.Start = (IToken)input.LT(1);
            int conditionalAndExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal119 = null;
            PNTreeParser.conditionalXorExpression_return conditionalXorExpression118 = default(PNTreeParser.conditionalXorExpression_return);
            PNTreeParser.conditionalXorExpression_return conditionalXorExpression120 = default(PNTreeParser.conditionalXorExpression_return);

            CommonTree string_literal119_tree = null;

            paraphrases.Push("in && (logic and) expression");
            try
            {
                DebugEnterRule(GrammarFileName, "conditionalAndExpression");
                DebugLocation(378, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 16)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:382:6: ( conditionalXorExpression ( '&&' conditionalXorExpression )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:382:8: conditionalXorExpression ( '&&' conditionalXorExpression )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(382, 8);
                        PushFollow(Follow._conditionalXorExpression_in_conditionalAndExpression1421);
                        conditionalXorExpression118 = conditionalXorExpression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, conditionalXorExpression118.Tree);
                        DebugLocation(382, 33);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:382:33: ( '&&' conditionalXorExpression )*
                        try
                        {
                            DebugEnterSubRule(27);
                            while (true)
                            {
                                int alt27 = 2;
                                try
                                {
                                    DebugEnterDecision(27, decisionCanBacktrack[27]);
                                    int LA27_0 = input.LA(1);

                                    if ((LA27_0 == 78))
                                    {
                                        alt27 = 1;
                                    }


                                }
                                finally { DebugExitDecision(27); }
                                switch (alt27)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:382:35: '&&' conditionalXorExpression
                                        {
                                            DebugLocation(382, 39);
                                            string_literal119 = (IToken)Match(input, 78, Follow._78_in_conditionalAndExpression1425); if (state.failed) return retval;
                                            if (state.backtracking == 0)
                                            {
                                                string_literal119_tree = (CommonTree)adaptor.Create(string_literal119);
                                                root_0 = (CommonTree)adaptor.BecomeRoot(string_literal119_tree, root_0);
                                            }
                                            DebugLocation(382, 41);
                                            PushFollow(Follow._conditionalXorExpression_in_conditionalAndExpression1428);
                                            conditionalXorExpression120 = conditionalXorExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, conditionalXorExpression120.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop27;
                                }
                            }

                        loop27:
                            ;

                        }
                        finally { DebugExitSubRule(27); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("conditionalAndExpression", 16);
                    LeaveRule("conditionalAndExpression", 16);
                    Leave_conditionalAndExpression();
                    if (state.backtracking > 0) { Memoize(input, 16, conditionalAndExpression_StartIndex); }
                }
                DebugLocation(383, 1);
            }
            finally { DebugExitRule(GrammarFileName, "conditionalAndExpression"); }
            return retval;

        }
        // $ANTLR end "conditionalAndExpression"

        public class conditionalXorExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_conditionalXorExpression();
        partial void Leave_conditionalXorExpression();

        // $ANTLR start "conditionalXorExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:385:1: conditionalXorExpression : bitwiseLogicExpression ( 'xor' bitwiseLogicExpression )* ;
        [GrammarRule("conditionalXorExpression")]
        private PNTreeParser.conditionalXorExpression_return conditionalXorExpression()
        {
            Enter_conditionalXorExpression();
            EnterRule("conditionalXorExpression", 17);
            TraceIn("conditionalXorExpression", 17);
            PNTreeParser.conditionalXorExpression_return retval = new PNTreeParser.conditionalXorExpression_return();
            retval.Start = (IToken)input.LT(1);
            int conditionalXorExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal122 = null;
            PNTreeParser.bitwiseLogicExpression_return bitwiseLogicExpression121 = default(PNTreeParser.bitwiseLogicExpression_return);
            PNTreeParser.bitwiseLogicExpression_return bitwiseLogicExpression123 = default(PNTreeParser.bitwiseLogicExpression_return);

            CommonTree string_literal122_tree = null;

            paraphrases.Push("in logic xor expression");
            try
            {
                DebugEnterRule(GrammarFileName, "conditionalXorExpression");
                DebugLocation(385, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 17)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:389:6: ( bitwiseLogicExpression ( 'xor' bitwiseLogicExpression )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:389:8: bitwiseLogicExpression ( 'xor' bitwiseLogicExpression )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(389, 8);
                        PushFollow(Follow._bitwiseLogicExpression_in_conditionalXorExpression1459);
                        bitwiseLogicExpression121 = bitwiseLogicExpression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, bitwiseLogicExpression121.Tree);
                        DebugLocation(389, 31);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:389:31: ( 'xor' bitwiseLogicExpression )*
                        try
                        {
                            DebugEnterSubRule(28);
                            while (true)
                            {
                                int alt28 = 2;
                                try
                                {
                                    DebugEnterDecision(28, decisionCanBacktrack[28]);
                                    int LA28_0 = input.LA(1);

                                    if ((LA28_0 == 110))
                                    {
                                        alt28 = 1;
                                    }


                                }
                                finally { DebugExitDecision(28); }
                                switch (alt28)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:389:33: 'xor' bitwiseLogicExpression
                                        {
                                            DebugLocation(389, 38);
                                            string_literal122 = (IToken)Match(input, 110, Follow._110_in_conditionalXorExpression1463); if (state.failed) return retval;
                                            if (state.backtracking == 0)
                                            {
                                                string_literal122_tree = (CommonTree)adaptor.Create(string_literal122);
                                                root_0 = (CommonTree)adaptor.BecomeRoot(string_literal122_tree, root_0);
                                            }
                                            DebugLocation(389, 40);
                                            PushFollow(Follow._bitwiseLogicExpression_in_conditionalXorExpression1466);
                                            bitwiseLogicExpression123 = bitwiseLogicExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, bitwiseLogicExpression123.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop28;
                                }
                            }

                        loop28:
                            ;

                        }
                        finally { DebugExitSubRule(28); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("conditionalXorExpression", 17);
                    LeaveRule("conditionalXorExpression", 17);
                    Leave_conditionalXorExpression();
                    if (state.backtracking > 0) { Memoize(input, 17, conditionalXorExpression_StartIndex); }
                }
                DebugLocation(390, 1);
            }
            finally { DebugExitRule(GrammarFileName, "conditionalXorExpression"); }
            return retval;

        }
        // $ANTLR end "conditionalXorExpression"

        public class bitwiseLogicExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_bitwiseLogicExpression();
        partial void Leave_bitwiseLogicExpression();

        // $ANTLR start "bitwiseLogicExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:398:1: bitwiseLogicExpression : equalityExpression ( ( '&' | '|' | '^' ) equalityExpression )* ;
        [GrammarRule("bitwiseLogicExpression")]
        private PNTreeParser.bitwiseLogicExpression_return bitwiseLogicExpression()
        {
            Enter_bitwiseLogicExpression();
            EnterRule("bitwiseLogicExpression", 18);
            TraceIn("bitwiseLogicExpression", 18);
            PNTreeParser.bitwiseLogicExpression_return retval = new PNTreeParser.bitwiseLogicExpression_return();
            retval.Start = (IToken)input.LT(1);
            int bitwiseLogicExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal125 = null;
            IToken char_literal126 = null;
            IToken char_literal127 = null;
            PNTreeParser.equalityExpression_return equalityExpression124 = default(PNTreeParser.equalityExpression_return);
            PNTreeParser.equalityExpression_return equalityExpression128 = default(PNTreeParser.equalityExpression_return);

            CommonTree char_literal125_tree = null;
            CommonTree char_literal126_tree = null;
            CommonTree char_literal127_tree = null;

            paraphrases.Push("in bitwise logic operator");
            try
            {
                DebugEnterRule(GrammarFileName, "bitwiseLogicExpression");
                DebugLocation(398, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 18)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:401:6: ( equalityExpression ( ( '&' | '|' | '^' ) equalityExpression )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:401:8: equalityExpression ( ( '&' | '|' | '^' ) equalityExpression )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(401, 8);
                        PushFollow(Follow._equalityExpression_in_bitwiseLogicExpression1502);
                        equalityExpression124 = equalityExpression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, equalityExpression124.Tree);
                        DebugLocation(401, 27);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:401:27: ( ( '&' | '|' | '^' ) equalityExpression )*
                        try
                        {
                            DebugEnterSubRule(30);
                            while (true)
                            {
                                int alt30 = 2;
                                try
                                {
                                    DebugEnterDecision(30, decisionCanBacktrack[30]);
                                    int LA30_0 = input.LA(1);

                                    if (((LA30_0 >= 111 && LA30_0 <= 113)))
                                    {
                                        alt30 = 1;
                                    }


                                }
                                finally { DebugExitDecision(30); }
                                switch (alt30)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:401:29: ( '&' | '|' | '^' ) equalityExpression
                                        {
                                            DebugLocation(401, 29);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:401:29: ( '&' | '|' | '^' )
                                            int alt29 = 3;
                                            try
                                            {
                                                DebugEnterSubRule(29);
                                                try
                                                {
                                                    DebugEnterDecision(29, decisionCanBacktrack[29]);
                                                    switch (input.LA(1))
                                                    {
                                                        case 111:
                                                            {
                                                                alt29 = 1;
                                                            }
                                                            break;
                                                        case 112:
                                                            {
                                                                alt29 = 2;
                                                            }
                                                            break;
                                                        case 113:
                                                            {
                                                                alt29 = 3;
                                                            }
                                                            break;
                                                        default:
                                                            {
                                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                                NoViableAltException nvae = new NoViableAltException("", 29, 0, input);

                                                                DebugRecognitionException(nvae);
                                                                throw nvae;
                                                            }
                                                    }

                                                }
                                                finally { DebugExitDecision(29); }
                                                switch (alt29)
                                                {
                                                    case 1:
                                                        DebugEnterAlt(1);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:401:31: '&'
                                                        {
                                                            DebugLocation(401, 34);
                                                            char_literal125 = (IToken)Match(input, 111, Follow._111_in_bitwiseLogicExpression1508); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal125_tree = (CommonTree)adaptor.Create(char_literal125);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal125_tree, root_0);
                                                            }

                                                        }
                                                        break;
                                                    case 2:
                                                        DebugEnterAlt(2);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:401:38: '|'
                                                        {
                                                            DebugLocation(401, 41);
                                                            char_literal126 = (IToken)Match(input, 112, Follow._112_in_bitwiseLogicExpression1513); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal126_tree = (CommonTree)adaptor.Create(char_literal126);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal126_tree, root_0);
                                                            }

                                                        }
                                                        break;
                                                    case 3:
                                                        DebugEnterAlt(3);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:401:45: '^'
                                                        {
                                                            DebugLocation(401, 48);
                                                            char_literal127 = (IToken)Match(input, 113, Follow._113_in_bitwiseLogicExpression1518); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal127_tree = (CommonTree)adaptor.Create(char_literal127);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal127_tree, root_0);
                                                            }

                                                        }
                                                        break;

                                                }
                                            }
                                            finally { DebugExitSubRule(29); }

                                            DebugLocation(401, 52);
                                            PushFollow(Follow._equalityExpression_in_bitwiseLogicExpression1523);
                                            equalityExpression128 = equalityExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, equalityExpression128.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop30;
                                }
                            }

                        loop30:
                            ;

                        }
                        finally { DebugExitSubRule(30); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("bitwiseLogicExpression", 18);
                    LeaveRule("bitwiseLogicExpression", 18);
                    Leave_bitwiseLogicExpression();
                    if (state.backtracking > 0) { Memoize(input, 18, bitwiseLogicExpression_StartIndex); }
                }
                DebugLocation(402, 1);
            }
            finally { DebugExitRule(GrammarFileName, "bitwiseLogicExpression"); }
            return retval;

        }
        // $ANTLR end "bitwiseLogicExpression"

        public class equalityExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_equalityExpression();
        partial void Leave_equalityExpression();

        // $ANTLR start "equalityExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:405:1: equalityExpression : relationalExpression ( ( '==' | '!=' ) relationalExpression )* ;
        [GrammarRule("equalityExpression")]
        private PNTreeParser.equalityExpression_return equalityExpression()
        {
            Enter_equalityExpression();
            EnterRule("equalityExpression", 19);
            TraceIn("equalityExpression", 19);
            PNTreeParser.equalityExpression_return retval = new PNTreeParser.equalityExpression_return();
            retval.Start = (IToken)input.LT(1);
            int equalityExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal130 = null;
            IToken string_literal131 = null;
            PNTreeParser.relationalExpression_return relationalExpression129 = default(PNTreeParser.relationalExpression_return);
            PNTreeParser.relationalExpression_return relationalExpression132 = default(PNTreeParser.relationalExpression_return);

            CommonTree string_literal130_tree = null;
            CommonTree string_literal131_tree = null;

            paraphrases.Push("in ==/!= expression");
            try
            {
                DebugEnterRule(GrammarFileName, "equalityExpression");
                DebugLocation(405, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 19)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:408:6: ( relationalExpression ( ( '==' | '!=' ) relationalExpression )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:408:8: relationalExpression ( ( '==' | '!=' ) relationalExpression )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(408, 8);
                        PushFollow(Follow._relationalExpression_in_equalityExpression1553);
                        relationalExpression129 = relationalExpression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, relationalExpression129.Tree);
                        DebugLocation(408, 29);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:408:29: ( ( '==' | '!=' ) relationalExpression )*
                        try
                        {
                            DebugEnterSubRule(32);
                            while (true)
                            {
                                int alt32 = 2;
                                try
                                {
                                    DebugEnterDecision(32, decisionCanBacktrack[32]);
                                    int LA32_0 = input.LA(1);

                                    if (((LA32_0 >= 114 && LA32_0 <= 115)))
                                    {
                                        alt32 = 1;
                                    }


                                }
                                finally { DebugExitDecision(32); }
                                switch (alt32)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:408:31: ( '==' | '!=' ) relationalExpression
                                        {
                                            DebugLocation(408, 31);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:408:31: ( '==' | '!=' )
                                            int alt31 = 2;
                                            try
                                            {
                                                DebugEnterSubRule(31);
                                                try
                                                {
                                                    DebugEnterDecision(31, decisionCanBacktrack[31]);
                                                    int LA31_0 = input.LA(1);

                                                    if ((LA31_0 == 114))
                                                    {
                                                        alt31 = 1;
                                                    }
                                                    else if ((LA31_0 == 115))
                                                    {
                                                        alt31 = 2;
                                                    }
                                                    else
                                                    {
                                                        if (state.backtracking > 0) { state.failed = true; return retval; }
                                                        NoViableAltException nvae = new NoViableAltException("", 31, 0, input);

                                                        DebugRecognitionException(nvae);
                                                        throw nvae;
                                                    }
                                                }
                                                finally { DebugExitDecision(31); }
                                                switch (alt31)
                                                {
                                                    case 1:
                                                        DebugEnterAlt(1);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:408:32: '=='
                                                        {
                                                            DebugLocation(408, 36);
                                                            string_literal130 = (IToken)Match(input, 114, Follow._114_in_equalityExpression1558); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                string_literal130_tree = (CommonTree)adaptor.Create(string_literal130);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(string_literal130_tree, root_0);
                                                            }

                                                        }
                                                        break;
                                                    case 2:
                                                        DebugEnterAlt(2);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:408:38: '!='
                                                        {
                                                            DebugLocation(408, 42);
                                                            string_literal131 = (IToken)Match(input, 115, Follow._115_in_equalityExpression1561); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                string_literal131_tree = (CommonTree)adaptor.Create(string_literal131);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(string_literal131_tree, root_0);
                                                            }

                                                        }
                                                        break;

                                                }
                                            }
                                            finally { DebugExitSubRule(31); }

                                            DebugLocation(408, 45);
                                            PushFollow(Follow._relationalExpression_in_equalityExpression1565);
                                            relationalExpression132 = relationalExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, relationalExpression132.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop32;
                                }
                            }

                        loop32:
                            ;

                        }
                        finally { DebugExitSubRule(32); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("equalityExpression", 19);
                    LeaveRule("equalityExpression", 19);
                    Leave_equalityExpression();
                    if (state.backtracking > 0) { Memoize(input, 19, equalityExpression_StartIndex); }
                }
                DebugLocation(409, 1);
            }
            finally { DebugExitRule(GrammarFileName, "equalityExpression"); }
            return retval;

        }
        // $ANTLR end "equalityExpression"

        public class relationalExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_relationalExpression();
        partial void Leave_relationalExpression();

        // $ANTLR start "relationalExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:411:1: relationalExpression : additiveExpression ( ( '<' | '>' | '<=' | '>=' ) additiveExpression )* ;
        [GrammarRule("relationalExpression")]
        private PNTreeParser.relationalExpression_return relationalExpression()
        {
            Enter_relationalExpression();
            EnterRule("relationalExpression", 20);
            TraceIn("relationalExpression", 20);
            PNTreeParser.relationalExpression_return retval = new PNTreeParser.relationalExpression_return();
            retval.Start = (IToken)input.LT(1);
            int relationalExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal134 = null;
            IToken char_literal135 = null;
            IToken string_literal136 = null;
            IToken string_literal137 = null;
            PNTreeParser.additiveExpression_return additiveExpression133 = default(PNTreeParser.additiveExpression_return);
            PNTreeParser.additiveExpression_return additiveExpression138 = default(PNTreeParser.additiveExpression_return);

            CommonTree char_literal134_tree = null;
            CommonTree char_literal135_tree = null;
            CommonTree string_literal136_tree = null;
            CommonTree string_literal137_tree = null;

            paraphrases.Push("in comparison expression");
            try
            {
                DebugEnterRule(GrammarFileName, "relationalExpression");
                DebugLocation(411, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 20)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:414:6: ( additiveExpression ( ( '<' | '>' | '<=' | '>=' ) additiveExpression )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:414:8: additiveExpression ( ( '<' | '>' | '<=' | '>=' ) additiveExpression )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(414, 8);
                        PushFollow(Follow._additiveExpression_in_relationalExpression1595);
                        additiveExpression133 = additiveExpression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, additiveExpression133.Tree);
                        DebugLocation(414, 27);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:414:27: ( ( '<' | '>' | '<=' | '>=' ) additiveExpression )*
                        try
                        {
                            DebugEnterSubRule(34);
                            while (true)
                            {
                                int alt34 = 2;
                                try
                                {
                                    DebugEnterDecision(34, decisionCanBacktrack[34]);
                                    int LA34_0 = input.LA(1);

                                    if (((LA34_0 >= 116 && LA34_0 <= 119)))
                                    {
                                        alt34 = 1;
                                    }


                                }
                                finally { DebugExitDecision(34); }
                                switch (alt34)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:414:29: ( '<' | '>' | '<=' | '>=' ) additiveExpression
                                        {
                                            DebugLocation(414, 29);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:414:29: ( '<' | '>' | '<=' | '>=' )
                                            int alt33 = 4;
                                            try
                                            {
                                                DebugEnterSubRule(33);
                                                try
                                                {
                                                    DebugEnterDecision(33, decisionCanBacktrack[33]);
                                                    switch (input.LA(1))
                                                    {
                                                        case 116:
                                                            {
                                                                alt33 = 1;
                                                            }
                                                            break;
                                                        case 117:
                                                            {
                                                                alt33 = 2;
                                                            }
                                                            break;
                                                        case 118:
                                                            {
                                                                alt33 = 3;
                                                            }
                                                            break;
                                                        case 119:
                                                            {
                                                                alt33 = 4;
                                                            }
                                                            break;
                                                        default:
                                                            {
                                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                                NoViableAltException nvae = new NoViableAltException("", 33, 0, input);

                                                                DebugRecognitionException(nvae);
                                                                throw nvae;
                                                            }
                                                    }

                                                }
                                                finally { DebugExitDecision(33); }
                                                switch (alt33)
                                                {
                                                    case 1:
                                                        DebugEnterAlt(1);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:414:30: '<'
                                                        {
                                                            DebugLocation(414, 33);
                                                            char_literal134 = (IToken)Match(input, 116, Follow._116_in_relationalExpression1600); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal134_tree = (CommonTree)adaptor.Create(char_literal134);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal134_tree, root_0);
                                                            }

                                                        }
                                                        break;
                                                    case 2:
                                                        DebugEnterAlt(2);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:414:37: '>'
                                                        {
                                                            DebugLocation(414, 40);
                                                            char_literal135 = (IToken)Match(input, 117, Follow._117_in_relationalExpression1605); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal135_tree = (CommonTree)adaptor.Create(char_literal135);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal135_tree, root_0);
                                                            }

                                                        }
                                                        break;
                                                    case 3:
                                                        DebugEnterAlt(3);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:414:44: '<='
                                                        {
                                                            DebugLocation(414, 48);
                                                            string_literal136 = (IToken)Match(input, 118, Follow._118_in_relationalExpression1610); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                string_literal136_tree = (CommonTree)adaptor.Create(string_literal136);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(string_literal136_tree, root_0);
                                                            }

                                                        }
                                                        break;
                                                    case 4:
                                                        DebugEnterAlt(4);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:414:52: '>='
                                                        {
                                                            DebugLocation(414, 56);
                                                            string_literal137 = (IToken)Match(input, 119, Follow._119_in_relationalExpression1615); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                string_literal137_tree = (CommonTree)adaptor.Create(string_literal137);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(string_literal137_tree, root_0);
                                                            }

                                                        }
                                                        break;

                                                }
                                            }
                                            finally { DebugExitSubRule(33); }

                                            DebugLocation(414, 59);
                                            PushFollow(Follow._additiveExpression_in_relationalExpression1619);
                                            additiveExpression138 = additiveExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, additiveExpression138.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop34;
                                }
                            }

                        loop34:
                            ;

                        }
                        finally { DebugExitSubRule(34); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("relationalExpression", 20);
                    LeaveRule("relationalExpression", 20);
                    Leave_relationalExpression();
                    if (state.backtracking > 0) { Memoize(input, 20, relationalExpression_StartIndex); }
                }
                DebugLocation(415, 1);
            }
            finally { DebugExitRule(GrammarFileName, "relationalExpression"); }
            return retval;

        }
        // $ANTLR end "relationalExpression"

        public class additiveExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_additiveExpression();
        partial void Leave_additiveExpression();

        // $ANTLR start "additiveExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:417:1: additiveExpression : multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )* ;
        [GrammarRule("additiveExpression")]
        private PNTreeParser.additiveExpression_return additiveExpression()
        {
            Enter_additiveExpression();
            EnterRule("additiveExpression", 21);
            TraceIn("additiveExpression", 21);
            PNTreeParser.additiveExpression_return retval = new PNTreeParser.additiveExpression_return();
            retval.Start = (IToken)input.LT(1);
            int additiveExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal140 = null;
            IToken char_literal141 = null;
            PNTreeParser.multiplicativeExpression_return multiplicativeExpression139 = default(PNTreeParser.multiplicativeExpression_return);
            PNTreeParser.multiplicativeExpression_return multiplicativeExpression142 = default(PNTreeParser.multiplicativeExpression_return);

            CommonTree char_literal140_tree = null;
            CommonTree char_literal141_tree = null;

            paraphrases.Push("in +/- expression");
            try
            {
                DebugEnterRule(GrammarFileName, "additiveExpression");
                DebugLocation(417, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 21)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:420:6: ( multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:420:8: multiplicativeExpression ( ( '+' | '-' ) multiplicativeExpression )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(420, 8);
                        PushFollow(Follow._multiplicativeExpression_in_additiveExpression1648);
                        multiplicativeExpression139 = multiplicativeExpression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, multiplicativeExpression139.Tree);
                        DebugLocation(420, 33);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:420:33: ( ( '+' | '-' ) multiplicativeExpression )*
                        try
                        {
                            DebugEnterSubRule(36);
                            while (true)
                            {
                                int alt36 = 2;
                                try
                                {
                                    DebugEnterDecision(36, decisionCanBacktrack[36]);
                                    int LA36_0 = input.LA(1);

                                    if ((LA36_0 == 102 || LA36_0 == 120))
                                    {
                                        alt36 = 1;
                                    }


                                }
                                finally { DebugExitDecision(36); }
                                switch (alt36)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:420:35: ( '+' | '-' ) multiplicativeExpression
                                        {
                                            DebugLocation(420, 35);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:420:35: ( '+' | '-' )
                                            int alt35 = 2;
                                            try
                                            {
                                                DebugEnterSubRule(35);
                                                try
                                                {
                                                    DebugEnterDecision(35, decisionCanBacktrack[35]);
                                                    int LA35_0 = input.LA(1);

                                                    if ((LA35_0 == 120))
                                                    {
                                                        alt35 = 1;
                                                    }
                                                    else if ((LA35_0 == 102))
                                                    {
                                                        alt35 = 2;
                                                    }
                                                    else
                                                    {
                                                        if (state.backtracking > 0) { state.failed = true; return retval; }
                                                        NoViableAltException nvae = new NoViableAltException("", 35, 0, input);

                                                        DebugRecognitionException(nvae);
                                                        throw nvae;
                                                    }
                                                }
                                                finally { DebugExitDecision(35); }
                                                switch (alt35)
                                                {
                                                    case 1:
                                                        DebugEnterAlt(1);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:420:36: '+'
                                                        {
                                                            DebugLocation(420, 39);
                                                            char_literal140 = (IToken)Match(input, 120, Follow._120_in_additiveExpression1653); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal140_tree = (CommonTree)adaptor.Create(char_literal140);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal140_tree, root_0);
                                                            }

                                                        }
                                                        break;
                                                    case 2:
                                                        DebugEnterAlt(2);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:420:43: '-'
                                                        {
                                                            DebugLocation(420, 46);
                                                            char_literal141 = (IToken)Match(input, 102, Follow._102_in_additiveExpression1658); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal141_tree = (CommonTree)adaptor.Create(char_literal141);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal141_tree, root_0);
                                                            }

                                                        }
                                                        break;

                                                }
                                            }
                                            finally { DebugExitSubRule(35); }

                                            DebugLocation(420, 49);
                                            PushFollow(Follow._multiplicativeExpression_in_additiveExpression1662);
                                            multiplicativeExpression142 = multiplicativeExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, multiplicativeExpression142.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop36;
                                }
                            }

                        loop36:
                            ;

                        }
                        finally { DebugExitSubRule(36); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("additiveExpression", 21);
                    LeaveRule("additiveExpression", 21);
                    Leave_additiveExpression();
                    if (state.backtracking > 0) { Memoize(input, 21, additiveExpression_StartIndex); }
                }
                DebugLocation(421, 1);
            }
            finally { DebugExitRule(GrammarFileName, "additiveExpression"); }
            return retval;

        }
        // $ANTLR end "additiveExpression"

        public class multiplicativeExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_multiplicativeExpression();
        partial void Leave_multiplicativeExpression();

        // $ANTLR start "multiplicativeExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:422:1: multiplicativeExpression : unaryExpression ( ( '*' | '/' | '%' ) unaryExpression )* ;
        [GrammarRule("multiplicativeExpression")]
        private PNTreeParser.multiplicativeExpression_return multiplicativeExpression()
        {
            Enter_multiplicativeExpression();
            EnterRule("multiplicativeExpression", 22);
            TraceIn("multiplicativeExpression", 22);
            PNTreeParser.multiplicativeExpression_return retval = new PNTreeParser.multiplicativeExpression_return();
            retval.Start = (IToken)input.LT(1);
            int multiplicativeExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal144 = null;
            IToken char_literal145 = null;
            IToken char_literal146 = null;
            PNTreeParser.unaryExpression_return unaryExpression143 = default(PNTreeParser.unaryExpression_return);
            PNTreeParser.unaryExpression_return unaryExpression147 = default(PNTreeParser.unaryExpression_return);

            CommonTree char_literal144_tree = null;
            CommonTree char_literal145_tree = null;
            CommonTree char_literal146_tree = null;

            paraphrases.Push("in */'/' expression");
            try
            {
                DebugEnterRule(GrammarFileName, "multiplicativeExpression");
                DebugLocation(422, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 22)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:425:6: ( unaryExpression ( ( '*' | '/' | '%' ) unaryExpression )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:425:8: unaryExpression ( ( '*' | '/' | '%' ) unaryExpression )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(425, 8);
                        PushFollow(Follow._unaryExpression_in_multiplicativeExpression1689);
                        unaryExpression143 = unaryExpression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, unaryExpression143.Tree);
                        DebugLocation(425, 24);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:425:24: ( ( '*' | '/' | '%' ) unaryExpression )*
                        try
                        {
                            DebugEnterSubRule(38);
                            while (true)
                            {
                                int alt38 = 2;
                                try
                                {
                                    DebugEnterDecision(38, decisionCanBacktrack[38]);
                                    int LA38_0 = input.LA(1);

                                    if (((LA38_0 >= 121 && LA38_0 <= 123)))
                                    {
                                        alt38 = 1;
                                    }


                                }
                                finally { DebugExitDecision(38); }
                                switch (alt38)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:425:26: ( '*' | '/' | '%' ) unaryExpression
                                        {
                                            DebugLocation(425, 26);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:425:26: ( '*' | '/' | '%' )
                                            int alt37 = 3;
                                            try
                                            {
                                                DebugEnterSubRule(37);
                                                try
                                                {
                                                    DebugEnterDecision(37, decisionCanBacktrack[37]);
                                                    switch (input.LA(1))
                                                    {
                                                        case 121:
                                                            {
                                                                alt37 = 1;
                                                            }
                                                            break;
                                                        case 122:
                                                            {
                                                                alt37 = 2;
                                                            }
                                                            break;
                                                        case 123:
                                                            {
                                                                alt37 = 3;
                                                            }
                                                            break;
                                                        default:
                                                            {
                                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                                NoViableAltException nvae = new NoViableAltException("", 37, 0, input);

                                                                DebugRecognitionException(nvae);
                                                                throw nvae;
                                                            }
                                                    }

                                                }
                                                finally { DebugExitDecision(37); }
                                                switch (alt37)
                                                {
                                                    case 1:
                                                        DebugEnterAlt(1);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:425:27: '*'
                                                        {
                                                            DebugLocation(425, 30);
                                                            char_literal144 = (IToken)Match(input, 121, Follow._121_in_multiplicativeExpression1694); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal144_tree = (CommonTree)adaptor.Create(char_literal144);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal144_tree, root_0);
                                                            }

                                                        }
                                                        break;
                                                    case 2:
                                                        DebugEnterAlt(2);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:425:34: '/'
                                                        {
                                                            DebugLocation(425, 37);
                                                            char_literal145 = (IToken)Match(input, 122, Follow._122_in_multiplicativeExpression1699); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal145_tree = (CommonTree)adaptor.Create(char_literal145);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal145_tree, root_0);
                                                            }

                                                        }
                                                        break;
                                                    case 3:
                                                        DebugEnterAlt(3);
                                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:425:41: '%'
                                                        {
                                                            DebugLocation(425, 44);
                                                            char_literal146 = (IToken)Match(input, 123, Follow._123_in_multiplicativeExpression1704); if (state.failed) return retval;
                                                            if (state.backtracking == 0)
                                                            {
                                                                char_literal146_tree = (CommonTree)adaptor.Create(char_literal146);
                                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal146_tree, root_0);
                                                            }

                                                        }
                                                        break;

                                                }
                                            }
                                            finally { DebugExitSubRule(37); }

                                            DebugLocation(425, 48);
                                            PushFollow(Follow._unaryExpression_in_multiplicativeExpression1709);
                                            unaryExpression147 = unaryExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, unaryExpression147.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop38;
                                }
                            }

                        loop38:
                            ;

                        }
                        finally { DebugExitSubRule(38); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("multiplicativeExpression", 22);
                    LeaveRule("multiplicativeExpression", 22);
                    Leave_multiplicativeExpression();
                    if (state.backtracking > 0) { Memoize(input, 22, multiplicativeExpression_StartIndex); }
                }
                DebugLocation(426, 1);
            }
            finally { DebugExitRule(GrammarFileName, "multiplicativeExpression"); }
            return retval;

        }
        // $ANTLR end "multiplicativeExpression"

        public class unaryExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_unaryExpression();
        partial void Leave_unaryExpression();

        // $ANTLR start "unaryExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:428:1: unaryExpression : ( '+' unaryExpression -> unaryExpression | '-' unaryExpression -> ^( UNARY_NODE unaryExpression ) | '!' unaryExpressionNotPlusMinus | unaryExpressionNotPlusMinus (op= '++' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '+' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) | op= '--' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '-' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) ) | unaryExpressionNotPlusMinus );
        [GrammarRule("unaryExpression")]
        private PNTreeParser.unaryExpression_return unaryExpression()
        {
            Enter_unaryExpression();
            EnterRule("unaryExpression", 23);
            TraceIn("unaryExpression", 23);
            PNTreeParser.unaryExpression_return retval = new PNTreeParser.unaryExpression_return();
            retval.Start = (IToken)input.LT(1);
            int unaryExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken op = null;
            IToken char_literal148 = null;
            IToken char_literal150 = null;
            IToken char_literal152 = null;
            PNTreeParser.unaryExpression_return unaryExpression149 = default(PNTreeParser.unaryExpression_return);
            PNTreeParser.unaryExpression_return unaryExpression151 = default(PNTreeParser.unaryExpression_return);
            PNTreeParser.unaryExpressionNotPlusMinus_return unaryExpressionNotPlusMinus153 = default(PNTreeParser.unaryExpressionNotPlusMinus_return);
            PNTreeParser.unaryExpressionNotPlusMinus_return unaryExpressionNotPlusMinus154 = default(PNTreeParser.unaryExpressionNotPlusMinus_return);
            PNTreeParser.unaryExpressionNotPlusMinus_return unaryExpressionNotPlusMinus155 = default(PNTreeParser.unaryExpressionNotPlusMinus_return);

            CommonTree op_tree = null;
            CommonTree char_literal148_tree = null;
            CommonTree char_literal150_tree = null;
            CommonTree char_literal152_tree = null;
            RewriteRuleITokenStream stream_125 = new RewriteRuleITokenStream(adaptor, "token 125");
            RewriteRuleITokenStream stream_124 = new RewriteRuleITokenStream(adaptor, "token 124");
            RewriteRuleITokenStream stream_120 = new RewriteRuleITokenStream(adaptor, "token 120");
            RewriteRuleITokenStream stream_102 = new RewriteRuleITokenStream(adaptor, "token 102");
            RewriteRuleSubtreeStream stream_unaryExpression = new RewriteRuleSubtreeStream(adaptor, "rule unaryExpression");
            RewriteRuleSubtreeStream stream_unaryExpressionNotPlusMinus = new RewriteRuleSubtreeStream(adaptor, "rule unaryExpressionNotPlusMinus");
            paraphrases.Push("in unary expression");
            try
            {
                DebugEnterRule(GrammarFileName, "unaryExpression");
                DebugLocation(428, 4);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 23)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:431:5: ( '+' unaryExpression -> unaryExpression | '-' unaryExpression -> ^( UNARY_NODE unaryExpression ) | '!' unaryExpressionNotPlusMinus | unaryExpressionNotPlusMinus (op= '++' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '+' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) | op= '--' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '-' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) ) | unaryExpressionNotPlusMinus )
                    int alt40 = 5;
                    try
                    {
                        DebugEnterDecision(40, decisionCanBacktrack[40]);
                        try
                        {
                            alt40 = dfa40.Predict(input);
                        }
                        catch (NoViableAltException nvae)
                        {
                            DebugRecognitionException(nvae);
                            throw;
                        }
                    }
                    finally { DebugExitDecision(40); }
                    switch (alt40)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:431:9: '+' unaryExpression
                            {
                                DebugLocation(431, 9);
                                char_literal148 = (IToken)Match(input, 120, Follow._120_in_unaryExpression1739); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_120.Add(char_literal148);

                                DebugLocation(431, 13);
                                PushFollow(Follow._unaryExpression_in_unaryExpression1741);
                                unaryExpression149 = unaryExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_unaryExpression.Add(unaryExpression149.Tree);


                                {
                                    // AST REWRITE
                                    // elements: unaryExpression
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 431:29: -> unaryExpression
                                        {
                                            DebugLocation(431, 32);
                                            adaptor.AddChild(root_0, stream_unaryExpression.NextTree());

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:432:9: '-' unaryExpression
                            {
                                DebugLocation(432, 9);
                                char_literal150 = (IToken)Match(input, 102, Follow._102_in_unaryExpression1755); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_102.Add(char_literal150);

                                DebugLocation(432, 13);
                                PushFollow(Follow._unaryExpression_in_unaryExpression1757);
                                unaryExpression151 = unaryExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_unaryExpression.Add(unaryExpression151.Tree);


                                {
                                    // AST REWRITE
                                    // elements: unaryExpression
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 432:29: -> ^( UNARY_NODE unaryExpression )
                                        {
                                            DebugLocation(432, 32);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:432:32: ^( UNARY_NODE unaryExpression )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(432, 34);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(UNARY_NODE, "UNARY_NODE"), root_1);

                                                DebugLocation(432, 45);
                                                adaptor.AddChild(root_1, stream_unaryExpression.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:433:7: '!' unaryExpressionNotPlusMinus
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(433, 10);
                                char_literal152 = (IToken)Match(input, 76, Follow._76_in_unaryExpression1773); if (state.failed) return retval;
                                if (state.backtracking == 0)
                                {
                                    char_literal152_tree = (CommonTree)adaptor.Create(char_literal152);
                                    root_0 = (CommonTree)adaptor.BecomeRoot(char_literal152_tree, root_0);
                                }
                                DebugLocation(433, 12);
                                PushFollow(Follow._unaryExpressionNotPlusMinus_in_unaryExpression1776);
                                unaryExpressionNotPlusMinus153 = unaryExpressionNotPlusMinus();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, unaryExpressionNotPlusMinus153.Tree);

                            }
                            break;
                        case 4:
                            DebugEnterAlt(4);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:434:9: unaryExpressionNotPlusMinus (op= '++' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '+' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) | op= '--' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '-' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) )
                            {
                                DebugLocation(434, 9);
                                PushFollow(Follow._unaryExpressionNotPlusMinus_in_unaryExpression1787);
                                unaryExpressionNotPlusMinus154 = unaryExpressionNotPlusMinus();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_unaryExpressionNotPlusMinus.Add(unaryExpressionNotPlusMinus154.Tree);
                                DebugLocation(435, 7);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:435:7: (op= '++' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '+' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) | op= '--' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '-' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) )
                                int alt39 = 2;
                                try
                                {
                                    DebugEnterSubRule(39);
                                    try
                                    {
                                        DebugEnterDecision(39, decisionCanBacktrack[39]);
                                        int LA39_0 = input.LA(1);

                                        if ((LA39_0 == 124))
                                        {
                                            alt39 = 1;
                                        }
                                        else if ((LA39_0 == 125))
                                        {
                                            alt39 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 39, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(39); }
                                    switch (alt39)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:435:9: op= '++'
                                            {
                                                DebugLocation(435, 11);
                                                op = (IToken)Match(input, 124, Follow._124_in_unaryExpression1800); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_124.Add(op);



                                                {
                                                    // AST REWRITE
                                                    // elements: unaryExpressionNotPlusMinus, 120, unaryExpressionNotPlusMinus
                                                    // token labels: 
                                                    // rule labels: retval
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 435:17: -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '+' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) )
                                                        {
                                                            DebugLocation(435, 20);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:435:20: ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '+' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) )
                                                            {
                                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                                DebugLocation(435, 22);
                                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(ASSIGNMENT_NODE, "ASSIGNMENT_NODE"), root_1);

                                                                DebugLocation(435, 38);
                                                                adaptor.AddChild(root_1, stream_unaryExpressionNotPlusMinus.NextTree());
                                                                DebugLocation(435, 66);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:435:66: ^( '+' unaryExpressionNotPlusMinus INT[$op, \"1\"] )
                                                                {
                                                                    CommonTree root_2 = (CommonTree)adaptor.Nil();
                                                                    DebugLocation(435, 68);
                                                                    root_2 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(120, "120"), root_2);

                                                                    DebugLocation(435, 72);
                                                                    adaptor.AddChild(root_2, stream_unaryExpressionNotPlusMinus.NextTree());
                                                                    DebugLocation(435, 100);
                                                                    adaptor.AddChild(root_2, (CommonTree)adaptor.Create(INT, op, "1"));

                                                                    adaptor.AddChild(root_1, root_2);
                                                                }

                                                                adaptor.AddChild(root_0, root_1);
                                                            }

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:436:9: op= '--'
                                            {
                                                DebugLocation(436, 11);
                                                op = (IToken)Match(input, 125, Follow._125_in_unaryExpression1831); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_125.Add(op);



                                                {
                                                    // AST REWRITE
                                                    // elements: unaryExpressionNotPlusMinus, unaryExpressionNotPlusMinus, 102
                                                    // token labels: 
                                                    // rule labels: retval
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 436:17: -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '-' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) )
                                                        {
                                                            DebugLocation(436, 20);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:436:20: ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '-' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) )
                                                            {
                                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                                DebugLocation(436, 22);
                                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(ASSIGNMENT_NODE, "ASSIGNMENT_NODE"), root_1);

                                                                DebugLocation(436, 38);
                                                                adaptor.AddChild(root_1, stream_unaryExpressionNotPlusMinus.NextTree());
                                                                DebugLocation(436, 66);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:436:66: ^( '-' unaryExpressionNotPlusMinus INT[$op, \"1\"] )
                                                                {
                                                                    CommonTree root_2 = (CommonTree)adaptor.Nil();
                                                                    DebugLocation(436, 68);
                                                                    root_2 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(102, "102"), root_2);

                                                                    DebugLocation(436, 72);
                                                                    adaptor.AddChild(root_2, stream_unaryExpressionNotPlusMinus.NextTree());
                                                                    DebugLocation(436, 100);
                                                                    adaptor.AddChild(root_2, (CommonTree)adaptor.Create(INT, op, "1"));

                                                                    adaptor.AddChild(root_1, root_2);
                                                                }

                                                                adaptor.AddChild(root_0, root_1);
                                                            }

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(39); }


                            }
                            break;
                        case 5:
                            DebugEnterAlt(5);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:438:9: unaryExpressionNotPlusMinus
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(438, 9);
                                PushFollow(Follow._unaryExpressionNotPlusMinus_in_unaryExpression1872);
                                unaryExpressionNotPlusMinus155 = unaryExpressionNotPlusMinus();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, unaryExpressionNotPlusMinus155.Tree);

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("unaryExpression", 23);
                    LeaveRule("unaryExpression", 23);
                    Leave_unaryExpression();
                    if (state.backtracking > 0) { Memoize(input, 23, unaryExpression_StartIndex); }
                }
                DebugLocation(439, 4);
            }
            finally { DebugExitRule(GrammarFileName, "unaryExpression"); }
            return retval;

        }
        // $ANTLR end "unaryExpression"

        public class arrayExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_arrayExpression();
        partial void Leave_arrayExpression();

        // $ANTLR start "arrayExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:441:1: arrayExpression : ID ( '[' conditionalOrExpression ']' )+ -> ^( VAR_NODE ID ( conditionalOrExpression )+ ) ;
        [GrammarRule("arrayExpression")]
        private PNTreeParser.arrayExpression_return arrayExpression()
        {
            Enter_arrayExpression();
            EnterRule("arrayExpression", 24);
            TraceIn("arrayExpression", 24);
            PNTreeParser.arrayExpression_return retval = new PNTreeParser.arrayExpression_return();
            retval.Start = (IToken)input.LT(1);
            int arrayExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken ID156 = null;
            IToken char_literal157 = null;
            IToken char_literal159 = null;
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression158 = default(PNTreeParser.conditionalOrExpression_return);

            CommonTree ID156_tree = null;
            CommonTree char_literal157_tree = null;
            CommonTree char_literal159_tree = null;
            RewriteRuleITokenStream stream_109 = new RewriteRuleITokenStream(adaptor, "token 109");
            RewriteRuleITokenStream stream_108 = new RewriteRuleITokenStream(adaptor, "token 108");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleSubtreeStream stream_conditionalOrExpression = new RewriteRuleSubtreeStream(adaptor, "rule conditionalOrExpression");
            paraphrases.Push("in array expression");
            try
            {
                DebugEnterRule(GrammarFileName, "arrayExpression");
                DebugLocation(441, 0);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 24)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:444:1: ( ID ( '[' conditionalOrExpression ']' )+ -> ^( VAR_NODE ID ( conditionalOrExpression )+ ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:445:1: ID ( '[' conditionalOrExpression ']' )+
                    {
                        DebugLocation(445, 1);
                        ID156 = (IToken)Match(input, ID, Follow._ID_in_arrayExpression1896); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_ID.Add(ID156);

                        DebugLocation(445, 4);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:445:4: ( '[' conditionalOrExpression ']' )+
                        int cnt41 = 0;
                        try
                        {
                            DebugEnterSubRule(41);
                            while (true)
                            {
                                int alt41 = 2;
                                try
                                {
                                    DebugEnterDecision(41, decisionCanBacktrack[41]);
                                    int LA41_0 = input.LA(1);

                                    if ((LA41_0 == 108))
                                    {
                                        alt41 = 1;
                                    }


                                }
                                finally { DebugExitDecision(41); }
                                switch (alt41)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:445:5: '[' conditionalOrExpression ']'
                                        {
                                            DebugLocation(445, 5);
                                            char_literal157 = (IToken)Match(input, 108, Follow._108_in_arrayExpression1899); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_108.Add(char_literal157);

                                            DebugLocation(445, 9);
                                            PushFollow(Follow._conditionalOrExpression_in_arrayExpression1901);
                                            conditionalOrExpression158 = conditionalOrExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression158.Tree);
                                            DebugLocation(445, 33);
                                            char_literal159 = (IToken)Match(input, 109, Follow._109_in_arrayExpression1903); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_109.Add(char_literal159);


                                        }
                                        break;

                                    default:
                                        if (cnt41 >= 1)
                                            goto loop41;

                                        if (state.backtracking > 0) { state.failed = true; return retval; }
                                        EarlyExitException eee41 = new EarlyExitException(41, input);
                                        DebugRecognitionException(eee41);
                                        throw eee41;
                                }
                                cnt41++;
                            }
                        loop41:
                            ;

                        }
                        finally { DebugExitSubRule(41); }



                        {
                            // AST REWRITE
                            // elements: ID, conditionalOrExpression
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 445:40: -> ^( VAR_NODE ID ( conditionalOrExpression )+ )
                                {
                                    DebugLocation(445, 43);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:445:43: ^( VAR_NODE ID ( conditionalOrExpression )+ )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(445, 45);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(VAR_NODE, "VAR_NODE"), root_1);

                                        DebugLocation(445, 54);
                                        adaptor.AddChild(root_1, stream_ID.NextNode());
                                        DebugLocation(445, 57);
                                        if (!(stream_conditionalOrExpression.HasNext))
                                        {
                                            throw new RewriteEarlyExitException();
                                        }
                                        while (stream_conditionalOrExpression.HasNext)
                                        {
                                            DebugLocation(445, 57);
                                            adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());

                                        }
                                        stream_conditionalOrExpression.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("arrayExpression", 24);
                    LeaveRule("arrayExpression", 24);
                    Leave_arrayExpression();
                    if (state.backtracking > 0) { Memoize(input, 24, arrayExpression_StartIndex); }
                }
                DebugLocation(446, 0);
            }
            finally { DebugExitRule(GrammarFileName, "arrayExpression"); }
            return retval;

        }
        // $ANTLR end "arrayExpression"

        public class unaryExpressionNotPlusMinus_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_unaryExpressionNotPlusMinus();
        partial void Leave_unaryExpressionNotPlusMinus();

        // $ANTLR start "unaryExpressionNotPlusMinus"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:447:1: unaryExpressionNotPlusMinus : ( INT | 'true' | 'false' | 'call' '(' ID ( ',' conditionalOrExpression )* ')' -> ^( CALL_NODE ID ( conditionalOrExpression )* ) | 'new' ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' -> ^( 'new' ID ( conditionalOrExpression )* ) | var= ID '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' -> ^( CLASS_CALL_NODE $var $method ( conditionalOrExpression )* ) | a1= arrayExpression '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' -> ^( CLASS_CALL_INSTANCE_NODE $a1 $method ( conditionalOrExpression )* ) | arrayExpression | '(' conditionalOrExpression ')' -> conditionalOrExpression | ID -> ^( VAR_NODE ID ) );
        [GrammarRule("unaryExpressionNotPlusMinus")]
        private PNTreeParser.unaryExpressionNotPlusMinus_return unaryExpressionNotPlusMinus()
        {
            Enter_unaryExpressionNotPlusMinus();
            EnterRule("unaryExpressionNotPlusMinus", 25);
            TraceIn("unaryExpressionNotPlusMinus", 25);
            PNTreeParser.unaryExpressionNotPlusMinus_return retval = new PNTreeParser.unaryExpressionNotPlusMinus_return();
            retval.Start = (IToken)input.LT(1);
            int unaryExpressionNotPlusMinus_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken var = null;
            IToken method = null;
            IToken INT160 = null;
            IToken string_literal161 = null;
            IToken string_literal162 = null;
            IToken string_literal163 = null;
            IToken char_literal164 = null;
            IToken ID165 = null;
            IToken char_literal166 = null;
            IToken char_literal168 = null;
            IToken string_literal169 = null;
            IToken ID170 = null;
            IToken char_literal171 = null;
            IToken char_literal173 = null;
            IToken char_literal175 = null;
            IToken char_literal176 = null;
            IToken char_literal177 = null;
            IToken char_literal179 = null;
            IToken char_literal181 = null;
            IToken char_literal182 = null;
            IToken char_literal183 = null;
            IToken char_literal185 = null;
            IToken char_literal187 = null;
            IToken char_literal189 = null;
            IToken char_literal191 = null;
            IToken ID192 = null;
            PNTreeParser.arrayExpression_return a1 = default(PNTreeParser.arrayExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression167 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression172 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression174 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression178 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression180 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression184 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression186 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.arrayExpression_return arrayExpression188 = default(PNTreeParser.arrayExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression190 = default(PNTreeParser.conditionalOrExpression_return);

            CommonTree var_tree = null;
            CommonTree method_tree = null;
            CommonTree INT160_tree = null;
            CommonTree string_literal161_tree = null;
            CommonTree string_literal162_tree = null;
            CommonTree string_literal163_tree = null;
            CommonTree char_literal164_tree = null;
            CommonTree ID165_tree = null;
            CommonTree char_literal166_tree = null;
            CommonTree char_literal168_tree = null;
            CommonTree string_literal169_tree = null;
            CommonTree ID170_tree = null;
            CommonTree char_literal171_tree = null;
            CommonTree char_literal173_tree = null;
            CommonTree char_literal175_tree = null;
            CommonTree char_literal176_tree = null;
            CommonTree char_literal177_tree = null;
            CommonTree char_literal179_tree = null;
            CommonTree char_literal181_tree = null;
            CommonTree char_literal182_tree = null;
            CommonTree char_literal183_tree = null;
            CommonTree char_literal185_tree = null;
            CommonTree char_literal187_tree = null;
            CommonTree char_literal189_tree = null;
            CommonTree char_literal191_tree = null;
            CommonTree ID192_tree = null;
            RewriteRuleITokenStream stream_126 = new RewriteRuleITokenStream(adaptor, "token 126");
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_127 = new RewriteRuleITokenStream(adaptor, "token 127");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");
            RewriteRuleITokenStream stream_85 = new RewriteRuleITokenStream(adaptor, "token 85");
            RewriteRuleSubtreeStream stream_conditionalOrExpression = new RewriteRuleSubtreeStream(adaptor, "rule conditionalOrExpression");
            RewriteRuleSubtreeStream stream_arrayExpression = new RewriteRuleSubtreeStream(adaptor, "rule arrayExpression");
            paraphrases.Push("in variable expression");
            try
            {
                DebugEnterRule(GrammarFileName, "unaryExpressionNotPlusMinus");
                DebugLocation(447, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 25)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:450:2: ( INT | 'true' | 'false' | 'call' '(' ID ( ',' conditionalOrExpression )* ')' -> ^( CALL_NODE ID ( conditionalOrExpression )* ) | 'new' ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' -> ^( 'new' ID ( conditionalOrExpression )* ) | var= ID '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' -> ^( CLASS_CALL_NODE $var $method ( conditionalOrExpression )* ) | a1= arrayExpression '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' -> ^( CLASS_CALL_INSTANCE_NODE $a1 $method ( conditionalOrExpression )* ) | arrayExpression | '(' conditionalOrExpression ')' -> conditionalOrExpression | ID -> ^( VAR_NODE ID ) )
                    int alt49 = 10;
                    try
                    {
                        DebugEnterDecision(49, decisionCanBacktrack[49]);
                        try
                        {
                            alt49 = dfa49.Predict(input);
                        }
                        catch (NoViableAltException nvae)
                        {
                            DebugRecognitionException(nvae);
                            throw;
                        }
                    }
                    finally { DebugExitDecision(49); }
                    switch (alt49)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:452:3: INT
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(452, 3);
                                INT160 = (IToken)Match(input, INT, Follow._INT_in_unaryExpressionNotPlusMinus1942); if (state.failed) return retval;
                                if (state.backtracking == 0)
                                {
                                    INT160_tree = (CommonTree)adaptor.Create(INT160);
                                    adaptor.AddChild(root_0, INT160_tree);
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:454:4: 'true'
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(454, 4);
                                string_literal161 = (IToken)Match(input, 103, Follow._103_in_unaryExpressionNotPlusMinus1949); if (state.failed) return retval;
                                if (state.backtracking == 0)
                                {
                                    string_literal161_tree = (CommonTree)adaptor.Create(string_literal161);
                                    adaptor.AddChild(root_0, string_literal161_tree);
                                }

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:455:4: 'false'
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(455, 4);
                                string_literal162 = (IToken)Match(input, 104, Follow._104_in_unaryExpressionNotPlusMinus1955); if (state.failed) return retval;
                                if (state.backtracking == 0)
                                {
                                    string_literal162_tree = (CommonTree)adaptor.Create(string_literal162);
                                    adaptor.AddChild(root_0, string_literal162_tree);
                                }

                            }
                            break;
                        case 4:
                            DebugEnterAlt(4);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:457:4: 'call' '(' ID ( ',' conditionalOrExpression )* ')'
                            {
                                DebugLocation(457, 4);
                                string_literal163 = (IToken)Match(input, 126, Follow._126_in_unaryExpressionNotPlusMinus1964); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_126.Add(string_literal163);

                                DebugLocation(457, 11);
                                char_literal164 = (IToken)Match(input, 72, Follow._72_in_unaryExpressionNotPlusMinus1966); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal164);

                                DebugLocation(457, 15);
                                ID165 = (IToken)Match(input, ID, Follow._ID_in_unaryExpressionNotPlusMinus1968); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID165);

                                DebugLocation(457, 18);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:457:18: ( ',' conditionalOrExpression )*
                                try
                                {
                                    DebugEnterSubRule(42);
                                    while (true)
                                    {
                                        int alt42 = 2;
                                        try
                                        {
                                            DebugEnterDecision(42, decisionCanBacktrack[42]);
                                            int LA42_0 = input.LA(1);

                                            if ((LA42_0 == 97))
                                            {
                                                alt42 = 1;
                                            }


                                        }
                                        finally { DebugExitDecision(42); }
                                        switch (alt42)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:457:19: ',' conditionalOrExpression
                                                {
                                                    DebugLocation(457, 19);
                                                    char_literal166 = (IToken)Match(input, 97, Follow._97_in_unaryExpressionNotPlusMinus1971); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_97.Add(char_literal166);

                                                    DebugLocation(457, 23);
                                                    PushFollow(Follow._conditionalOrExpression_in_unaryExpressionNotPlusMinus1973);
                                                    conditionalOrExpression167 = conditionalOrExpression();
                                                    PopFollow();
                                                    if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression167.Tree);

                                                }
                                                break;

                                            default:
                                                goto loop42;
                                        }
                                    }

                                loop42:
                                    ;

                                }
                                finally { DebugExitSubRule(42); }

                                DebugLocation(457, 49);
                                char_literal168 = (IToken)Match(input, 73, Follow._73_in_unaryExpressionNotPlusMinus1977); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal168);

                                DebugLocation(457, 53);
                                if (state.backtracking == 0)
                                {
                                    PAT.Common.Classes.ModuleInterface.SpecificationBase.HasCSharpCode = true;
                                }


                                {
                                    // AST REWRITE
                                    // elements: conditionalOrExpression, ID
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 457:128: -> ^( CALL_NODE ID ( conditionalOrExpression )* )
                                        {
                                            DebugLocation(457, 131);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:457:131: ^( CALL_NODE ID ( conditionalOrExpression )* )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(457, 133);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CALL_NODE, "CALL_NODE"), root_1);

                                                DebugLocation(457, 143);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(457, 146);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:457:146: ( conditionalOrExpression )*
                                                while (stream_conditionalOrExpression.HasNext)
                                                {
                                                    DebugLocation(457, 146);
                                                    adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());

                                                }
                                                stream_conditionalOrExpression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 5:
                            DebugEnterAlt(5);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:458:4: 'new' ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')'
                            {
                                DebugLocation(458, 4);
                                string_literal169 = (IToken)Match(input, 127, Follow._127_in_unaryExpressionNotPlusMinus1997); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_127.Add(string_literal169);

                                DebugLocation(458, 10);
                                ID170 = (IToken)Match(input, ID, Follow._ID_in_unaryExpressionNotPlusMinus1999); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID170);

                                DebugLocation(458, 13);
                                char_literal171 = (IToken)Match(input, 72, Follow._72_in_unaryExpressionNotPlusMinus2001); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal171);

                                DebugLocation(458, 17);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:458:17: ( conditionalOrExpression ( ',' conditionalOrExpression )* )?
                                int alt44 = 2;
                                try
                                {
                                    DebugEnterSubRule(44);
                                    try
                                    {
                                        DebugEnterDecision(44, decisionCanBacktrack[44]);
                                        int LA44_0 = input.LA(1);

                                        if (((LA44_0 >= ID && LA44_0 <= INT) || LA44_0 == 72 || LA44_0 == 76 || (LA44_0 >= 102 && LA44_0 <= 104) || LA44_0 == 120 || (LA44_0 >= 126 && LA44_0 <= 127)))
                                        {
                                            alt44 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(44); }
                                    switch (alt44)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:458:18: conditionalOrExpression ( ',' conditionalOrExpression )*
                                            {
                                                DebugLocation(458, 18);
                                                PushFollow(Follow._conditionalOrExpression_in_unaryExpressionNotPlusMinus2004);
                                                conditionalOrExpression172 = conditionalOrExpression();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression172.Tree);
                                                DebugLocation(458, 42);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:458:42: ( ',' conditionalOrExpression )*
                                                try
                                                {
                                                    DebugEnterSubRule(43);
                                                    while (true)
                                                    {
                                                        int alt43 = 2;
                                                        try
                                                        {
                                                            DebugEnterDecision(43, decisionCanBacktrack[43]);
                                                            int LA43_0 = input.LA(1);

                                                            if ((LA43_0 == 97))
                                                            {
                                                                alt43 = 1;
                                                            }


                                                        }
                                                        finally { DebugExitDecision(43); }
                                                        switch (alt43)
                                                        {
                                                            case 1:
                                                                DebugEnterAlt(1);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:458:43: ',' conditionalOrExpression
                                                                {
                                                                    DebugLocation(458, 43);
                                                                    char_literal173 = (IToken)Match(input, 97, Follow._97_in_unaryExpressionNotPlusMinus2007); if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_97.Add(char_literal173);

                                                                    DebugLocation(458, 47);
                                                                    PushFollow(Follow._conditionalOrExpression_in_unaryExpressionNotPlusMinus2009);
                                                                    conditionalOrExpression174 = conditionalOrExpression();
                                                                    PopFollow();
                                                                    if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression174.Tree);

                                                                }
                                                                break;

                                                            default:
                                                                goto loop43;
                                                        }
                                                    }

                                                loop43:
                                                    ;

                                                }
                                                finally { DebugExitSubRule(43); }


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(44); }

                                DebugLocation(458, 75);
                                char_literal175 = (IToken)Match(input, 73, Follow._73_in_unaryExpressionNotPlusMinus2015); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal175);



                                {
                                    // AST REWRITE
                                    // elements: conditionalOrExpression, 127, ID
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 458:80: -> ^( 'new' ID ( conditionalOrExpression )* )
                                        {
                                            DebugLocation(458, 83);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:458:83: ^( 'new' ID ( conditionalOrExpression )* )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(458, 85);
                                                root_1 = (CommonTree)adaptor.BecomeRoot(stream_127.NextNode(), root_1);

                                                DebugLocation(458, 91);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(458, 94);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:458:94: ( conditionalOrExpression )*
                                                while (stream_conditionalOrExpression.HasNext)
                                                {
                                                    DebugLocation(458, 94);
                                                    adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());

                                                }
                                                stream_conditionalOrExpression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 6:
                            DebugEnterAlt(6);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:4: var= ID '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')'
                            {
                                DebugLocation(459, 7);
                                var = (IToken)Match(input, ID, Follow._ID_in_unaryExpressionNotPlusMinus2035); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(var);

                                DebugLocation(459, 11);
                                char_literal176 = (IToken)Match(input, 85, Follow._85_in_unaryExpressionNotPlusMinus2037); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_85.Add(char_literal176);

                                DebugLocation(459, 21);
                                method = (IToken)Match(input, ID, Follow._ID_in_unaryExpressionNotPlusMinus2041); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(method);

                                DebugLocation(459, 25);
                                char_literal177 = (IToken)Match(input, 72, Follow._72_in_unaryExpressionNotPlusMinus2043); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal177);

                                DebugLocation(459, 29);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:29: ( conditionalOrExpression ( ',' conditionalOrExpression )* )?
                                int alt46 = 2;
                                try
                                {
                                    DebugEnterSubRule(46);
                                    try
                                    {
                                        DebugEnterDecision(46, decisionCanBacktrack[46]);
                                        int LA46_0 = input.LA(1);

                                        if (((LA46_0 >= ID && LA46_0 <= INT) || LA46_0 == 72 || LA46_0 == 76 || (LA46_0 >= 102 && LA46_0 <= 104) || LA46_0 == 120 || (LA46_0 >= 126 && LA46_0 <= 127)))
                                        {
                                            alt46 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(46); }
                                    switch (alt46)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:30: conditionalOrExpression ( ',' conditionalOrExpression )*
                                            {
                                                DebugLocation(459, 30);
                                                PushFollow(Follow._conditionalOrExpression_in_unaryExpressionNotPlusMinus2046);
                                                conditionalOrExpression178 = conditionalOrExpression();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression178.Tree);
                                                DebugLocation(459, 54);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:54: ( ',' conditionalOrExpression )*
                                                try
                                                {
                                                    DebugEnterSubRule(45);
                                                    while (true)
                                                    {
                                                        int alt45 = 2;
                                                        try
                                                        {
                                                            DebugEnterDecision(45, decisionCanBacktrack[45]);
                                                            int LA45_0 = input.LA(1);

                                                            if ((LA45_0 == 97))
                                                            {
                                                                alt45 = 1;
                                                            }


                                                        }
                                                        finally { DebugExitDecision(45); }
                                                        switch (alt45)
                                                        {
                                                            case 1:
                                                                DebugEnterAlt(1);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:55: ',' conditionalOrExpression
                                                                {
                                                                    DebugLocation(459, 55);
                                                                    char_literal179 = (IToken)Match(input, 97, Follow._97_in_unaryExpressionNotPlusMinus2049); if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_97.Add(char_literal179);

                                                                    DebugLocation(459, 59);
                                                                    PushFollow(Follow._conditionalOrExpression_in_unaryExpressionNotPlusMinus2051);
                                                                    conditionalOrExpression180 = conditionalOrExpression();
                                                                    PopFollow();
                                                                    if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression180.Tree);

                                                                }
                                                                break;

                                                            default:
                                                                goto loop45;
                                                        }
                                                    }

                                                loop45:
                                                    ;

                                                }
                                                finally { DebugExitSubRule(45); }


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(46); }

                                DebugLocation(459, 87);
                                char_literal181 = (IToken)Match(input, 73, Follow._73_in_unaryExpressionNotPlusMinus2057); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal181);



                                {
                                    // AST REWRITE
                                    // elements: conditionalOrExpression, method, var
                                    // token labels: var, method
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_var = new RewriteRuleITokenStream(adaptor, "token var", var);
                                        RewriteRuleITokenStream stream_method = new RewriteRuleITokenStream(adaptor, "token method", method);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 459:92: -> ^( CLASS_CALL_NODE $var $method ( conditionalOrExpression )* )
                                        {
                                            DebugLocation(459, 95);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:95: ^( CLASS_CALL_NODE $var $method ( conditionalOrExpression )* )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(459, 97);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CLASS_CALL_NODE, "CLASS_CALL_NODE"), root_1);

                                                DebugLocation(459, 113);
                                                adaptor.AddChild(root_1, stream_var.NextNode());
                                                DebugLocation(459, 118);
                                                adaptor.AddChild(root_1, stream_method.NextNode());
                                                DebugLocation(459, 126);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:126: ( conditionalOrExpression )*
                                                while (stream_conditionalOrExpression.HasNext)
                                                {
                                                    DebugLocation(459, 126);
                                                    adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());

                                                }
                                                stream_conditionalOrExpression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 7:
                            DebugEnterAlt(7);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:4: a1= arrayExpression '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')'
                            {
                                DebugLocation(460, 6);
                                PushFollow(Follow._arrayExpression_in_unaryExpressionNotPlusMinus2080);
                                a1 = arrayExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_arrayExpression.Add(a1.Tree);
                                DebugLocation(460, 23);
                                char_literal182 = (IToken)Match(input, 85, Follow._85_in_unaryExpressionNotPlusMinus2082); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_85.Add(char_literal182);

                                DebugLocation(460, 33);
                                method = (IToken)Match(input, ID, Follow._ID_in_unaryExpressionNotPlusMinus2086); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(method);

                                DebugLocation(460, 37);
                                char_literal183 = (IToken)Match(input, 72, Follow._72_in_unaryExpressionNotPlusMinus2088); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal183);

                                DebugLocation(460, 41);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:41: ( conditionalOrExpression ( ',' conditionalOrExpression )* )?
                                int alt48 = 2;
                                try
                                {
                                    DebugEnterSubRule(48);
                                    try
                                    {
                                        DebugEnterDecision(48, decisionCanBacktrack[48]);
                                        int LA48_0 = input.LA(1);

                                        if (((LA48_0 >= ID && LA48_0 <= INT) || LA48_0 == 72 || LA48_0 == 76 || (LA48_0 >= 102 && LA48_0 <= 104) || LA48_0 == 120 || (LA48_0 >= 126 && LA48_0 <= 127)))
                                        {
                                            alt48 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(48); }
                                    switch (alt48)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:42: conditionalOrExpression ( ',' conditionalOrExpression )*
                                            {
                                                DebugLocation(460, 42);
                                                PushFollow(Follow._conditionalOrExpression_in_unaryExpressionNotPlusMinus2091);
                                                conditionalOrExpression184 = conditionalOrExpression();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression184.Tree);
                                                DebugLocation(460, 66);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:66: ( ',' conditionalOrExpression )*
                                                try
                                                {
                                                    DebugEnterSubRule(47);
                                                    while (true)
                                                    {
                                                        int alt47 = 2;
                                                        try
                                                        {
                                                            DebugEnterDecision(47, decisionCanBacktrack[47]);
                                                            int LA47_0 = input.LA(1);

                                                            if ((LA47_0 == 97))
                                                            {
                                                                alt47 = 1;
                                                            }


                                                        }
                                                        finally { DebugExitDecision(47); }
                                                        switch (alt47)
                                                        {
                                                            case 1:
                                                                DebugEnterAlt(1);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:67: ',' conditionalOrExpression
                                                                {
                                                                    DebugLocation(460, 67);
                                                                    char_literal185 = (IToken)Match(input, 97, Follow._97_in_unaryExpressionNotPlusMinus2094); if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_97.Add(char_literal185);

                                                                    DebugLocation(460, 71);
                                                                    PushFollow(Follow._conditionalOrExpression_in_unaryExpressionNotPlusMinus2096);
                                                                    conditionalOrExpression186 = conditionalOrExpression();
                                                                    PopFollow();
                                                                    if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression186.Tree);

                                                                }
                                                                break;

                                                            default:
                                                                goto loop47;
                                                        }
                                                    }

                                                loop47:
                                                    ;

                                                }
                                                finally { DebugExitSubRule(47); }


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(48); }

                                DebugLocation(460, 99);
                                char_literal187 = (IToken)Match(input, 73, Follow._73_in_unaryExpressionNotPlusMinus2102); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal187);



                                {
                                    // AST REWRITE
                                    // elements: a1, conditionalOrExpression, method
                                    // token labels: method
                                    // rule labels: retval, a1
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_method = new RewriteRuleITokenStream(adaptor, "token method", method);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                        RewriteRuleSubtreeStream stream_a1 = new RewriteRuleSubtreeStream(adaptor, "rule a1", a1 != null ? a1.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 460:104: -> ^( CLASS_CALL_INSTANCE_NODE $a1 $method ( conditionalOrExpression )* )
                                        {
                                            DebugLocation(460, 107);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:107: ^( CLASS_CALL_INSTANCE_NODE $a1 $method ( conditionalOrExpression )* )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(460, 109);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CLASS_CALL_INSTANCE_NODE, "CLASS_CALL_INSTANCE_NODE"), root_1);

                                                DebugLocation(460, 134);
                                                adaptor.AddChild(root_1, stream_a1.NextTree());
                                                DebugLocation(460, 138);
                                                adaptor.AddChild(root_1, stream_method.NextNode());
                                                DebugLocation(460, 146);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:146: ( conditionalOrExpression )*
                                                while (stream_conditionalOrExpression.HasNext)
                                                {
                                                    DebugLocation(460, 146);
                                                    adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());

                                                }
                                                stream_conditionalOrExpression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 8:
                            DebugEnterAlt(8);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:464:4: arrayExpression
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(464, 4);
                                PushFollow(Follow._arrayExpression_in_unaryExpressionNotPlusMinus2126);
                                arrayExpression188 = arrayExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, arrayExpression188.Tree);

                            }
                            break;
                        case 9:
                            DebugEnterAlt(9);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:465:4: '(' conditionalOrExpression ')'
                            {
                                DebugLocation(465, 4);
                                char_literal189 = (IToken)Match(input, 72, Follow._72_in_unaryExpressionNotPlusMinus2132); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal189);

                                DebugLocation(465, 8);
                                PushFollow(Follow._conditionalOrExpression_in_unaryExpressionNotPlusMinus2134);
                                conditionalOrExpression190 = conditionalOrExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression190.Tree);
                                DebugLocation(465, 32);
                                char_literal191 = (IToken)Match(input, 73, Follow._73_in_unaryExpressionNotPlusMinus2136); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal191);



                                {
                                    // AST REWRITE
                                    // elements: conditionalOrExpression
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 465:36: -> conditionalOrExpression
                                        {
                                            DebugLocation(465, 39);
                                            adaptor.AddChild(root_0, stream_conditionalOrExpression.NextTree());

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 10:
                            DebugEnterAlt(10);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:467:4: ID
                            {
                                DebugLocation(467, 4);
                                ID192 = (IToken)Match(input, ID, Follow._ID_in_unaryExpressionNotPlusMinus2147); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID192);



                                {
                                    // AST REWRITE
                                    // elements: ID
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 467:8: -> ^( VAR_NODE ID )
                                        {
                                            DebugLocation(467, 11);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:467:11: ^( VAR_NODE ID )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(467, 13);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(VAR_NODE, "VAR_NODE"), root_1);

                                                DebugLocation(467, 22);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("unaryExpressionNotPlusMinus", 25);
                    LeaveRule("unaryExpressionNotPlusMinus", 25);
                    Leave_unaryExpressionNotPlusMinus();
                    if (state.backtracking > 0) { Memoize(input, 25, unaryExpressionNotPlusMinus_StartIndex); }
                }
                DebugLocation(480, 1);
            }
            finally { DebugExitRule(GrammarFileName, "unaryExpressionNotPlusMinus"); }
            return retval;

        }
        // $ANTLR end "unaryExpressionNotPlusMinus"

        public class letDefintion_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_letDefintion();
        partial void Leave_letDefintion();

        // $ANTLR start "letDefintion"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:482:1: letDefintion : ( ( 'var' | hvar= 'hvar' ) ( '<' userType= ID '>' )? name= ID ( varaibleRange )? ( '=' ( expression | wildstar= '*' ) )? ';' -> ^( LET_NODE ( $userType)? $name ( varaibleRange )? ( expression )? ) | ( 'var' | hvar= 'hvar' ) ID ( varaibleRange )? '=' recordExpression ';' -> ^( LET_NODE ID ( varaibleRange )? recordExpression ) | ( 'var' | hvar= 'hvar' ) ID ( '[' expression ']' )+ ( varaibleRange )? ( '=' ( recordExpression | wildstar= '*' ) )? ';' -> ^( LET_ARRAY_NODE ID ( varaibleRange )? ( expression )+ ( recordExpression )? ) );
        [GrammarRule("letDefintion")]
        private PNTreeParser.letDefintion_return letDefintion()
        {
            Enter_letDefintion();
            EnterRule("letDefintion", 26);
            TraceIn("letDefintion", 26);
            PNTreeParser.letDefintion_return retval = new PNTreeParser.letDefintion_return();
            retval.Start = (IToken)input.LT(1);
            int letDefintion_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken hvar = null;
            IToken userType = null;
            IToken name = null;
            IToken wildstar = null;
            IToken string_literal193 = null;
            IToken char_literal194 = null;
            IToken char_literal195 = null;
            IToken char_literal197 = null;
            IToken char_literal199 = null;
            IToken string_literal200 = null;
            IToken ID201 = null;
            IToken char_literal203 = null;
            IToken char_literal205 = null;
            IToken string_literal206 = null;
            IToken ID207 = null;
            IToken char_literal208 = null;
            IToken char_literal210 = null;
            IToken char_literal212 = null;
            IToken char_literal214 = null;
            PNTreeParser.varaibleRange_return varaibleRange196 = default(PNTreeParser.varaibleRange_return);
            PNTreeParser.expression_return expression198 = default(PNTreeParser.expression_return);
            PNTreeParser.varaibleRange_return varaibleRange202 = default(PNTreeParser.varaibleRange_return);
            PNTreeParser.recordExpression_return recordExpression204 = default(PNTreeParser.recordExpression_return);
            PNTreeParser.expression_return expression209 = default(PNTreeParser.expression_return);
            PNTreeParser.varaibleRange_return varaibleRange211 = default(PNTreeParser.varaibleRange_return);
            PNTreeParser.recordExpression_return recordExpression213 = default(PNTreeParser.recordExpression_return);

            CommonTree hvar_tree = null;
            CommonTree userType_tree = null;
            CommonTree name_tree = null;
            CommonTree wildstar_tree = null;
            CommonTree string_literal193_tree = null;
            CommonTree char_literal194_tree = null;
            CommonTree char_literal195_tree = null;
            CommonTree char_literal197_tree = null;
            CommonTree char_literal199_tree = null;
            CommonTree string_literal200_tree = null;
            CommonTree ID201_tree = null;
            CommonTree char_literal203_tree = null;
            CommonTree char_literal205_tree = null;
            CommonTree string_literal206_tree = null;
            CommonTree ID207_tree = null;
            CommonTree char_literal208_tree = null;
            CommonTree char_literal210_tree = null;
            CommonTree char_literal212_tree = null;
            CommonTree char_literal214_tree = null;
            RewriteRuleITokenStream stream_116 = new RewriteRuleITokenStream(adaptor, "token 116");
            RewriteRuleITokenStream stream_117 = new RewriteRuleITokenStream(adaptor, "token 117");
            RewriteRuleITokenStream stream_128 = new RewriteRuleITokenStream(adaptor, "token 128");
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_121 = new RewriteRuleITokenStream(adaptor, "token 121");
            RewriteRuleITokenStream stream_109 = new RewriteRuleITokenStream(adaptor, "token 109");
            RewriteRuleITokenStream stream_108 = new RewriteRuleITokenStream(adaptor, "token 108");
            RewriteRuleITokenStream stream_107 = new RewriteRuleITokenStream(adaptor, "token 107");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_106 = new RewriteRuleITokenStream(adaptor, "token 106");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            RewriteRuleSubtreeStream stream_recordExpression = new RewriteRuleSubtreeStream(adaptor, "rule recordExpression");
            RewriteRuleSubtreeStream stream_varaibleRange = new RewriteRuleSubtreeStream(adaptor, "rule varaibleRange");
            try
            {
                DebugEnterRule(GrammarFileName, "letDefintion");
                DebugLocation(482, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 26)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:2: ( ( 'var' | hvar= 'hvar' ) ( '<' userType= ID '>' )? name= ID ( varaibleRange )? ( '=' ( expression | wildstar= '*' ) )? ';' -> ^( LET_NODE ( $userType)? $name ( varaibleRange )? ( expression )? ) | ( 'var' | hvar= 'hvar' ) ID ( varaibleRange )? '=' recordExpression ';' -> ^( LET_NODE ID ( varaibleRange )? recordExpression ) | ( 'var' | hvar= 'hvar' ) ID ( '[' expression ']' )+ ( varaibleRange )? ( '=' ( recordExpression | wildstar= '*' ) )? ';' -> ^( LET_ARRAY_NODE ID ( varaibleRange )? ( expression )+ ( recordExpression )? ) )
                    int alt62 = 3;
                    try
                    {
                        DebugEnterDecision(62, decisionCanBacktrack[62]);
                        int LA62_0 = input.LA(1);

                        if ((LA62_0 == 106))
                        {
                            int LA62_1 = input.LA(2);

                            if ((EvaluatePredicate(synpred105_PNTree_fragment)))
                            {
                                alt62 = 1;
                            }
                            else if ((EvaluatePredicate(synpred108_PNTree_fragment)))
                            {
                                alt62 = 2;
                            }
                            else if ((true))
                            {
                                alt62 = 3;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                NoViableAltException nvae = new NoViableAltException("", 62, 1, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        else if ((LA62_0 == 128))
                        {
                            int LA62_2 = input.LA(2);

                            if ((EvaluatePredicate(synpred105_PNTree_fragment)))
                            {
                                alt62 = 1;
                            }
                            else if ((EvaluatePredicate(synpred108_PNTree_fragment)))
                            {
                                alt62 = 2;
                            }
                            else if ((true))
                            {
                                alt62 = 3;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                NoViableAltException nvae = new NoViableAltException("", 62, 2, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 62, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(62); }
                    switch (alt62)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:4: ( 'var' | hvar= 'hvar' ) ( '<' userType= ID '>' )? name= ID ( varaibleRange )? ( '=' ( expression | wildstar= '*' ) )? ';'
                            {
                                DebugLocation(483, 4);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:4: ( 'var' | hvar= 'hvar' )
                                int alt50 = 2;
                                try
                                {
                                    DebugEnterSubRule(50);
                                    try
                                    {
                                        DebugEnterDecision(50, decisionCanBacktrack[50]);
                                        int LA50_0 = input.LA(1);

                                        if ((LA50_0 == 106))
                                        {
                                            alt50 = 1;
                                        }
                                        else if ((LA50_0 == 128))
                                        {
                                            alt50 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 50, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(50); }
                                    switch (alt50)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:5: 'var'
                                            {
                                                DebugLocation(483, 5);
                                                string_literal193 = (IToken)Match(input, 106, Follow._106_in_letDefintion2183); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_106.Add(string_literal193);


                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:11: hvar= 'hvar'
                                            {
                                                DebugLocation(483, 15);
                                                hvar = (IToken)Match(input, 128, Follow._128_in_letDefintion2187); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_128.Add(hvar);


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(50); }

                                DebugLocation(483, 24);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:24: ( '<' userType= ID '>' )?
                                int alt51 = 2;
                                try
                                {
                                    DebugEnterSubRule(51);
                                    try
                                    {
                                        DebugEnterDecision(51, decisionCanBacktrack[51]);
                                        int LA51_0 = input.LA(1);

                                        if ((LA51_0 == 116))
                                        {
                                            alt51 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(51); }
                                    switch (alt51)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:25: '<' userType= ID '>'
                                            {
                                                DebugLocation(483, 25);
                                                char_literal194 = (IToken)Match(input, 116, Follow._116_in_letDefintion2191); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_116.Add(char_literal194);

                                                DebugLocation(483, 37);
                                                userType = (IToken)Match(input, ID, Follow._ID_in_letDefintion2195); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_ID.Add(userType);

                                                DebugLocation(483, 41);
                                                char_literal195 = (IToken)Match(input, 117, Follow._117_in_letDefintion2197); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_117.Add(char_literal195);


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(51); }

                                DebugLocation(483, 51);
                                name = (IToken)Match(input, ID, Follow._ID_in_letDefintion2203); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(name);

                                DebugLocation(483, 55);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:55: ( varaibleRange )?
                                int alt52 = 2;
                                try
                                {
                                    DebugEnterSubRule(52);
                                    try
                                    {
                                        DebugEnterDecision(52, decisionCanBacktrack[52]);
                                        int LA52_0 = input.LA(1);

                                        if ((LA52_0 == 129))
                                        {
                                            alt52 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(52); }
                                    switch (alt52)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: varaibleRange
                                            {
                                                DebugLocation(483, 55);
                                                PushFollow(Follow._varaibleRange_in_letDefintion2205);
                                                varaibleRange196 = varaibleRange();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_varaibleRange.Add(varaibleRange196.Tree);

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(52); }

                                DebugLocation(483, 70);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:70: ( '=' ( expression | wildstar= '*' ) )?
                                int alt54 = 2;
                                try
                                {
                                    DebugEnterSubRule(54);
                                    try
                                    {
                                        DebugEnterDecision(54, decisionCanBacktrack[54]);
                                        int LA54_0 = input.LA(1);

                                        if ((LA54_0 == 107))
                                        {
                                            alt54 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(54); }
                                    switch (alt54)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:71: '=' ( expression | wildstar= '*' )
                                            {
                                                DebugLocation(483, 71);
                                                char_literal197 = (IToken)Match(input, 107, Follow._107_in_letDefintion2209); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_107.Add(char_literal197);

                                                DebugLocation(483, 75);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:75: ( expression | wildstar= '*' )
                                                int alt53 = 2;
                                                try
                                                {
                                                    DebugEnterSubRule(53);
                                                    try
                                                    {
                                                        DebugEnterDecision(53, decisionCanBacktrack[53]);
                                                        int LA53_0 = input.LA(1);

                                                        if (((LA53_0 >= ID && LA53_0 <= INT) || LA53_0 == 72 || LA53_0 == 76 || (LA53_0 >= 102 && LA53_0 <= 104) || LA53_0 == 120 || (LA53_0 >= 126 && LA53_0 <= 127)))
                                                        {
                                                            alt53 = 1;
                                                        }
                                                        else if ((LA53_0 == 121))
                                                        {
                                                            alt53 = 2;
                                                        }
                                                        else
                                                        {
                                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                                            NoViableAltException nvae = new NoViableAltException("", 53, 0, input);

                                                            DebugRecognitionException(nvae);
                                                            throw nvae;
                                                        }
                                                    }
                                                    finally { DebugExitDecision(53); }
                                                    switch (alt53)
                                                    {
                                                        case 1:
                                                            DebugEnterAlt(1);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:76: expression
                                                            {
                                                                DebugLocation(483, 76);
                                                                PushFollow(Follow._expression_in_letDefintion2212);
                                                                expression198 = expression();
                                                                PopFollow();
                                                                if (state.failed) return retval;
                                                                if (state.backtracking == 0) stream_expression.Add(expression198.Tree);

                                                            }
                                                            break;
                                                        case 2:
                                                            DebugEnterAlt(2);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:87: wildstar= '*'
                                                            {
                                                                DebugLocation(483, 95);
                                                                wildstar = (IToken)Match(input, 121, Follow._121_in_letDefintion2216); if (state.failed) return retval;
                                                                if (state.backtracking == 0) stream_121.Add(wildstar);


                                                            }
                                                            break;

                                                    }
                                                }
                                                finally { DebugExitSubRule(53); }


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(54); }

                                DebugLocation(483, 104);
                                char_literal199 = (IToken)Match(input, 68, Follow._68_in_letDefintion2222); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal199);

                                DebugLocation(484, 3);
                                if (state.backtracking == 0)
                                {
                                    if (hvar != null) { HiddenVars.Add(name.Text); }
                                    if (wildstar != null) { WildVars.Add(name.Text, name.Text); }
                                    GlobalVarNames.Add(name);
                                    PAT.Common.Classes.ModuleInterface.SpecificationBase.HasCSharpCode = true;

                                }


                                {
                                    // AST REWRITE
                                    // elements: expression, varaibleRange, name, userType
                                    // token labels: name, userType
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_name = new RewriteRuleITokenStream(adaptor, "token name", name);
                                        RewriteRuleITokenStream stream_userType = new RewriteRuleITokenStream(adaptor, "token userType", userType);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 489:3: -> ^( LET_NODE ( $userType)? $name ( varaibleRange )? ( expression )? )
                                        {
                                            DebugLocation(489, 6);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:489:6: ^( LET_NODE ( $userType)? $name ( varaibleRange )? ( expression )? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(489, 8);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(LET_NODE, "LET_NODE"), root_1);

                                                DebugLocation(489, 18);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:489:18: ( $userType)?
                                                if (stream_userType.HasNext)
                                                {
                                                    DebugLocation(489, 18);
                                                    adaptor.AddChild(root_1, stream_userType.NextNode());

                                                }
                                                stream_userType.Reset();
                                                DebugLocation(489, 29);
                                                adaptor.AddChild(root_1, stream_name.NextNode());
                                                DebugLocation(489, 35);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:489:35: ( varaibleRange )?
                                                if (stream_varaibleRange.HasNext)
                                                {
                                                    DebugLocation(489, 35);
                                                    adaptor.AddChild(root_1, stream_varaibleRange.NextTree());

                                                }
                                                stream_varaibleRange.Reset();
                                                DebugLocation(489, 50);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:489:50: ( expression )?
                                                if (stream_expression.HasNext)
                                                {
                                                    DebugLocation(489, 50);
                                                    adaptor.AddChild(root_1, stream_expression.NextTree());

                                                }
                                                stream_expression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:4: ( 'var' | hvar= 'hvar' ) ID ( varaibleRange )? '=' recordExpression ';'
                            {
                                DebugLocation(490, 4);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:4: ( 'var' | hvar= 'hvar' )
                                int alt55 = 2;
                                try
                                {
                                    DebugEnterSubRule(55);
                                    try
                                    {
                                        DebugEnterDecision(55, decisionCanBacktrack[55]);
                                        int LA55_0 = input.LA(1);

                                        if ((LA55_0 == 106))
                                        {
                                            alt55 = 1;
                                        }
                                        else if ((LA55_0 == 128))
                                        {
                                            alt55 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 55, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(55); }
                                    switch (alt55)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:5: 'var'
                                            {
                                                DebugLocation(490, 5);
                                                string_literal200 = (IToken)Match(input, 106, Follow._106_in_letDefintion2257); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_106.Add(string_literal200);


                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:11: hvar= 'hvar'
                                            {
                                                DebugLocation(490, 15);
                                                hvar = (IToken)Match(input, 128, Follow._128_in_letDefintion2261); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_128.Add(hvar);


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(55); }

                                DebugLocation(490, 24);
                                ID201 = (IToken)Match(input, ID, Follow._ID_in_letDefintion2264); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID201);

                                DebugLocation(490, 27);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:27: ( varaibleRange )?
                                int alt56 = 2;
                                try
                                {
                                    DebugEnterSubRule(56);
                                    try
                                    {
                                        DebugEnterDecision(56, decisionCanBacktrack[56]);
                                        int LA56_0 = input.LA(1);

                                        if ((LA56_0 == 129))
                                        {
                                            alt56 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(56); }
                                    switch (alt56)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: varaibleRange
                                            {
                                                DebugLocation(490, 27);
                                                PushFollow(Follow._varaibleRange_in_letDefintion2266);
                                                varaibleRange202 = varaibleRange();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_varaibleRange.Add(varaibleRange202.Tree);

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(56); }

                                DebugLocation(490, 42);
                                char_literal203 = (IToken)Match(input, 107, Follow._107_in_letDefintion2269); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_107.Add(char_literal203);

                                DebugLocation(490, 46);
                                PushFollow(Follow._recordExpression_in_letDefintion2271);
                                recordExpression204 = recordExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_recordExpression.Add(recordExpression204.Tree);
                                DebugLocation(490, 63);
                                char_literal205 = (IToken)Match(input, 68, Follow._68_in_letDefintion2273); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal205);

                                DebugLocation(490, 67);
                                if (state.backtracking == 0)
                                {
                                    if (hvar != null) { HiddenVars.Add(ID201.Text); } GlobalRecordNames.Add(ID201);
                                }


                                {
                                    // AST REWRITE
                                    // elements: ID, varaibleRange, recordExpression
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 490:139: -> ^( LET_NODE ID ( varaibleRange )? recordExpression )
                                        {
                                            DebugLocation(490, 142);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:142: ^( LET_NODE ID ( varaibleRange )? recordExpression )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(490, 144);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(LET_NODE, "LET_NODE"), root_1);

                                                DebugLocation(490, 153);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(490, 156);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:156: ( varaibleRange )?
                                                if (stream_varaibleRange.HasNext)
                                                {
                                                    DebugLocation(490, 156);
                                                    adaptor.AddChild(root_1, stream_varaibleRange.NextTree());

                                                }
                                                stream_varaibleRange.Reset();
                                                DebugLocation(490, 171);
                                                adaptor.AddChild(root_1, stream_recordExpression.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:4: ( 'var' | hvar= 'hvar' ) ID ( '[' expression ']' )+ ( varaibleRange )? ( '=' ( recordExpression | wildstar= '*' ) )? ';'
                            {
                                DebugLocation(491, 4);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:4: ( 'var' | hvar= 'hvar' )
                                int alt57 = 2;
                                try
                                {
                                    DebugEnterSubRule(57);
                                    try
                                    {
                                        DebugEnterDecision(57, decisionCanBacktrack[57]);
                                        int LA57_0 = input.LA(1);

                                        if ((LA57_0 == 106))
                                        {
                                            alt57 = 1;
                                        }
                                        else if ((LA57_0 == 128))
                                        {
                                            alt57 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 57, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(57); }
                                    switch (alt57)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:5: 'var'
                                            {
                                                DebugLocation(491, 5);
                                                string_literal206 = (IToken)Match(input, 106, Follow._106_in_letDefintion2295); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_106.Add(string_literal206);


                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:11: hvar= 'hvar'
                                            {
                                                DebugLocation(491, 15);
                                                hvar = (IToken)Match(input, 128, Follow._128_in_letDefintion2299); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_128.Add(hvar);


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(57); }

                                DebugLocation(491, 24);
                                ID207 = (IToken)Match(input, ID, Follow._ID_in_letDefintion2302); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID207);

                                DebugLocation(491, 27);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:27: ( '[' expression ']' )+
                                int cnt58 = 0;
                                try
                                {
                                    DebugEnterSubRule(58);
                                    while (true)
                                    {
                                        int alt58 = 2;
                                        try
                                        {
                                            DebugEnterDecision(58, decisionCanBacktrack[58]);
                                            int LA58_0 = input.LA(1);

                                            if ((LA58_0 == 108))
                                            {
                                                alt58 = 1;
                                            }


                                        }
                                        finally { DebugExitDecision(58); }
                                        switch (alt58)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:28: '[' expression ']'
                                                {
                                                    DebugLocation(491, 28);
                                                    char_literal208 = (IToken)Match(input, 108, Follow._108_in_letDefintion2305); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_108.Add(char_literal208);

                                                    DebugLocation(491, 32);
                                                    PushFollow(Follow._expression_in_letDefintion2307);
                                                    expression209 = expression();
                                                    PopFollow();
                                                    if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_expression.Add(expression209.Tree);
                                                    DebugLocation(491, 43);
                                                    char_literal210 = (IToken)Match(input, 109, Follow._109_in_letDefintion2309); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_109.Add(char_literal210);


                                                }
                                                break;

                                            default:
                                                if (cnt58 >= 1)
                                                    goto loop58;

                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                EarlyExitException eee58 = new EarlyExitException(58, input);
                                                DebugRecognitionException(eee58);
                                                throw eee58;
                                        }
                                        cnt58++;
                                    }
                                loop58:
                                    ;

                                }
                                finally { DebugExitSubRule(58); }

                                DebugLocation(491, 49);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:49: ( varaibleRange )?
                                int alt59 = 2;
                                try
                                {
                                    DebugEnterSubRule(59);
                                    try
                                    {
                                        DebugEnterDecision(59, decisionCanBacktrack[59]);
                                        int LA59_0 = input.LA(1);

                                        if ((LA59_0 == 129))
                                        {
                                            alt59 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(59); }
                                    switch (alt59)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: varaibleRange
                                            {
                                                DebugLocation(491, 49);
                                                PushFollow(Follow._varaibleRange_in_letDefintion2313);
                                                varaibleRange211 = varaibleRange();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_varaibleRange.Add(varaibleRange211.Tree);

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(59); }

                                DebugLocation(491, 64);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:64: ( '=' ( recordExpression | wildstar= '*' ) )?
                                int alt61 = 2;
                                try
                                {
                                    DebugEnterSubRule(61);
                                    try
                                    {
                                        DebugEnterDecision(61, decisionCanBacktrack[61]);
                                        int LA61_0 = input.LA(1);

                                        if ((LA61_0 == 107))
                                        {
                                            alt61 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(61); }
                                    switch (alt61)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:65: '=' ( recordExpression | wildstar= '*' )
                                            {
                                                DebugLocation(491, 65);
                                                char_literal212 = (IToken)Match(input, 107, Follow._107_in_letDefintion2317); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_107.Add(char_literal212);

                                                DebugLocation(491, 69);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:69: ( recordExpression | wildstar= '*' )
                                                int alt60 = 2;
                                                try
                                                {
                                                    DebugEnterSubRule(60);
                                                    try
                                                    {
                                                        DebugEnterDecision(60, decisionCanBacktrack[60]);
                                                        int LA60_0 = input.LA(1);

                                                        if ((LA60_0 == 108))
                                                        {
                                                            alt60 = 1;
                                                        }
                                                        else if ((LA60_0 == 121))
                                                        {
                                                            alt60 = 2;
                                                        }
                                                        else
                                                        {
                                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                                            NoViableAltException nvae = new NoViableAltException("", 60, 0, input);

                                                            DebugRecognitionException(nvae);
                                                            throw nvae;
                                                        }
                                                    }
                                                    finally { DebugExitDecision(60); }
                                                    switch (alt60)
                                                    {
                                                        case 1:
                                                            DebugEnterAlt(1);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:70: recordExpression
                                                            {
                                                                DebugLocation(491, 70);
                                                                PushFollow(Follow._recordExpression_in_letDefintion2320);
                                                                recordExpression213 = recordExpression();
                                                                PopFollow();
                                                                if (state.failed) return retval;
                                                                if (state.backtracking == 0) stream_recordExpression.Add(recordExpression213.Tree);

                                                            }
                                                            break;
                                                        case 2:
                                                            DebugEnterAlt(2);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:491:87: wildstar= '*'
                                                            {
                                                                DebugLocation(491, 95);
                                                                wildstar = (IToken)Match(input, 121, Follow._121_in_letDefintion2324); if (state.failed) return retval;
                                                                if (state.backtracking == 0) stream_121.Add(wildstar);


                                                            }
                                                            break;

                                                    }
                                                }
                                                finally { DebugExitSubRule(60); }


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(61); }

                                DebugLocation(491, 104);
                                char_literal214 = (IToken)Match(input, 68, Follow._68_in_letDefintion2330); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal214);

                                DebugLocation(492, 10);
                                if (state.backtracking == 0)
                                {

                                    if (hvar != null) { HiddenVars.Add(ID207.Text); } GlobalRecordNames.Add(ID207);
                                    if (wildstar != null) { WildVars.Add(ID207.Text, ID207.Text); }

                                }


                                {
                                    // AST REWRITE
                                    // elements: varaibleRange, recordExpression, ID, expression
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 496:10: -> ^( LET_ARRAY_NODE ID ( varaibleRange )? ( expression )+ ( recordExpression )? )
                                        {
                                            DebugLocation(496, 13);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:496:13: ^( LET_ARRAY_NODE ID ( varaibleRange )? ( expression )+ ( recordExpression )? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(496, 15);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(LET_ARRAY_NODE, "LET_ARRAY_NODE"), root_1);

                                                DebugLocation(496, 30);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(496, 33);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:496:33: ( varaibleRange )?
                                                if (stream_varaibleRange.HasNext)
                                                {
                                                    DebugLocation(496, 33);
                                                    adaptor.AddChild(root_1, stream_varaibleRange.NextTree());

                                                }
                                                stream_varaibleRange.Reset();
                                                DebugLocation(496, 48);
                                                if (!(stream_expression.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_expression.HasNext)
                                                {
                                                    DebugLocation(496, 48);
                                                    adaptor.AddChild(root_1, stream_expression.NextTree());

                                                }
                                                stream_expression.Reset();
                                                DebugLocation(496, 60);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:496:60: ( recordExpression )?
                                                if (stream_recordExpression.HasNext)
                                                {
                                                    DebugLocation(496, 60);
                                                    adaptor.AddChild(root_1, stream_recordExpression.NextTree());

                                                }
                                                stream_recordExpression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("letDefintion", 26);
                    LeaveRule("letDefintion", 26);
                    Leave_letDefintion();
                    if (state.backtracking > 0) { Memoize(input, 26, letDefintion_StartIndex); }
                }
                DebugLocation(497, 1);
            }
            finally { DebugExitRule(GrammarFileName, "letDefintion"); }
            return retval;

        }
        // $ANTLR end "letDefintion"

        public class varaibleRange_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_varaibleRange();
        partial void Leave_varaibleRange();

        // $ANTLR start "varaibleRange"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:501:1: varaibleRange : ':' '{' (lower= additiveExpression )? '..' (upper= additiveExpression )? '}' -> ^( VARIABLE_RANGE_NODE ( $lower)? '.' ( $upper)? ) ;
        [GrammarRule("varaibleRange")]
        private PNTreeParser.varaibleRange_return varaibleRange()
        {
            Enter_varaibleRange();
            EnterRule("varaibleRange", 27);
            TraceIn("varaibleRange", 27);
            PNTreeParser.varaibleRange_return retval = new PNTreeParser.varaibleRange_return();
            retval.Start = (IToken)input.LT(1);
            int varaibleRange_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal215 = null;
            IToken char_literal216 = null;
            IToken string_literal217 = null;
            IToken char_literal218 = null;
            PNTreeParser.additiveExpression_return lower = default(PNTreeParser.additiveExpression_return);
            PNTreeParser.additiveExpression_return upper = default(PNTreeParser.additiveExpression_return);

            CommonTree char_literal215_tree = null;
            CommonTree char_literal216_tree = null;
            CommonTree string_literal217_tree = null;
            CommonTree char_literal218_tree = null;
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_129 = new RewriteRuleITokenStream(adaptor, "token 129");
            RewriteRuleITokenStream stream_130 = new RewriteRuleITokenStream(adaptor, "token 130");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_additiveExpression = new RewriteRuleSubtreeStream(adaptor, "rule additiveExpression");
            try
            {
                DebugEnterRule(GrammarFileName, "varaibleRange");
                DebugLocation(501, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 27)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:502:2: ( ':' '{' (lower= additiveExpression )? '..' (upper= additiveExpression )? '}' -> ^( VARIABLE_RANGE_NODE ( $lower)? '.' ( $upper)? ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:502:4: ':' '{' (lower= additiveExpression )? '..' (upper= additiveExpression )? '}'
                    {
                        DebugLocation(502, 4);
                        char_literal215 = (IToken)Match(input, 129, Follow._129_in_varaibleRange2382); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_129.Add(char_literal215);

                        DebugLocation(502, 8);
                        char_literal216 = (IToken)Match(input, 99, Follow._99_in_varaibleRange2384); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_99.Add(char_literal216);

                        DebugLocation(502, 12);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:502:12: (lower= additiveExpression )?
                        int alt63 = 2;
                        try
                        {
                            DebugEnterSubRule(63);
                            try
                            {
                                DebugEnterDecision(63, decisionCanBacktrack[63]);
                                int LA63_0 = input.LA(1);

                                if (((LA63_0 >= ID && LA63_0 <= INT) || LA63_0 == 72 || LA63_0 == 76 || (LA63_0 >= 102 && LA63_0 <= 104) || LA63_0 == 120 || (LA63_0 >= 126 && LA63_0 <= 127)))
                                {
                                    alt63 = 1;
                                }
                            }
                            finally { DebugExitDecision(63); }
                            switch (alt63)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:502:13: lower= additiveExpression
                                    {
                                        DebugLocation(502, 18);
                                        PushFollow(Follow._additiveExpression_in_varaibleRange2389);
                                        lower = additiveExpression();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_additiveExpression.Add(lower.Tree);

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(63); }

                        DebugLocation(502, 40);
                        string_literal217 = (IToken)Match(input, 130, Follow._130_in_varaibleRange2393); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_130.Add(string_literal217);

                        DebugLocation(502, 45);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:502:45: (upper= additiveExpression )?
                        int alt64 = 2;
                        try
                        {
                            DebugEnterSubRule(64);
                            try
                            {
                                DebugEnterDecision(64, decisionCanBacktrack[64]);
                                int LA64_0 = input.LA(1);

                                if (((LA64_0 >= ID && LA64_0 <= INT) || LA64_0 == 72 || LA64_0 == 76 || (LA64_0 >= 102 && LA64_0 <= 104) || LA64_0 == 120 || (LA64_0 >= 126 && LA64_0 <= 127)))
                                {
                                    alt64 = 1;
                                }
                            }
                            finally { DebugExitDecision(64); }
                            switch (alt64)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:502:46: upper= additiveExpression
                                    {
                                        DebugLocation(502, 51);
                                        PushFollow(Follow._additiveExpression_in_varaibleRange2398);
                                        upper = additiveExpression();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_additiveExpression.Add(upper.Tree);

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(64); }

                        DebugLocation(502, 73);
                        char_literal218 = (IToken)Match(input, 100, Follow._100_in_varaibleRange2402); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_100.Add(char_literal218);



                        {
                            // AST REWRITE
                            // elements: lower, 85, upper
                            // token labels: 
                            // rule labels: upper, retval, lower
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_upper = new RewriteRuleSubtreeStream(adaptor, "rule upper", upper != null ? upper.Tree : null);
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                RewriteRuleSubtreeStream stream_lower = new RewriteRuleSubtreeStream(adaptor, "rule lower", lower != null ? lower.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 502:77: -> ^( VARIABLE_RANGE_NODE ( $lower)? '.' ( $upper)? )
                                {
                                    DebugLocation(502, 80);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:502:80: ^( VARIABLE_RANGE_NODE ( $lower)? '.' ( $upper)? )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(502, 82);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(VARIABLE_RANGE_NODE, "VARIABLE_RANGE_NODE"), root_1);

                                        DebugLocation(502, 102);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:502:102: ( $lower)?
                                        if (stream_lower.HasNext)
                                        {
                                            DebugLocation(502, 102);
                                            adaptor.AddChild(root_1, stream_lower.NextTree());

                                        }
                                        stream_lower.Reset();
                                        DebugLocation(502, 110);
                                        adaptor.AddChild(root_1, (CommonTree)adaptor.Create(85, "85"));
                                        DebugLocation(502, 114);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:502:114: ( $upper)?
                                        if (stream_upper.HasNext)
                                        {
                                            DebugLocation(502, 114);
                                            adaptor.AddChild(root_1, stream_upper.NextTree());

                                        }
                                        stream_upper.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("varaibleRange", 27);
                    LeaveRule("varaibleRange", 27);
                    Leave_varaibleRange();
                    if (state.backtracking > 0) { Memoize(input, 27, varaibleRange_StartIndex); }
                }
                DebugLocation(503, 1);
            }
            finally { DebugExitRule(GrammarFileName, "varaibleRange"); }
            return retval;

        }
        // $ANTLR end "varaibleRange"

        public class ifExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_ifExpression();
        partial void Leave_ifExpression();

        // $ANTLR start "ifExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:541:1: ifExpression : iftag= 'if' '(' expression ')' s1= statement ( 'else' s2= statement )? -> ^( 'if' expression $s1 ( $s2)? ) ;
        [GrammarRule("ifExpression")]
        private PNTreeParser.ifExpression_return ifExpression()
        {
            Enter_ifExpression();
            EnterRule("ifExpression", 28);
            TraceIn("ifExpression", 28);
            PNTreeParser.ifExpression_return retval = new PNTreeParser.ifExpression_return();
            retval.Start = (IToken)input.LT(1);
            int ifExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken iftag = null;
            IToken char_literal219 = null;
            IToken char_literal221 = null;
            IToken string_literal222 = null;
            PNTreeParser.statement_return s1 = default(PNTreeParser.statement_return);
            PNTreeParser.statement_return s2 = default(PNTreeParser.statement_return);
            PNTreeParser.expression_return expression220 = default(PNTreeParser.expression_return);

            CommonTree iftag_tree = null;
            CommonTree char_literal219_tree = null;
            CommonTree char_literal221_tree = null;
            CommonTree string_literal222_tree = null;
            RewriteRuleITokenStream stream_132 = new RewriteRuleITokenStream(adaptor, "token 132");
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");
            RewriteRuleITokenStream stream_131 = new RewriteRuleITokenStream(adaptor, "token 131");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            RewriteRuleSubtreeStream stream_statement = new RewriteRuleSubtreeStream(adaptor, "rule statement");
            paraphrases.Push("in if expression");
            try
            {
                DebugEnterRule(GrammarFileName, "ifExpression");
                DebugLocation(541, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 28)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:544:2: (iftag= 'if' '(' expression ')' s1= statement ( 'else' s2= statement )? -> ^( 'if' expression $s1 ( $s2)? ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:544:5: iftag= 'if' '(' expression ')' s1= statement ( 'else' s2= statement )?
                    {
                        DebugLocation(544, 10);
                        iftag = (IToken)Match(input, 131, Follow._131_in_ifExpression2449); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_131.Add(iftag);

                        DebugLocation(544, 16);
                        char_literal219 = (IToken)Match(input, 72, Follow._72_in_ifExpression2451); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_72.Add(char_literal219);

                        DebugLocation(544, 20);
                        PushFollow(Follow._expression_in_ifExpression2453);
                        expression220 = expression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_expression.Add(expression220.Tree);
                        DebugLocation(544, 31);
                        char_literal221 = (IToken)Match(input, 73, Follow._73_in_ifExpression2455); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_73.Add(char_literal221);

                        DebugLocation(544, 37);
                        PushFollow(Follow._statement_in_ifExpression2459);
                        s1 = statement();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_statement.Add(s1.Tree);
                        DebugLocation(544, 48);
                        if (state.backtracking == 0)
                        {
                            if (s1.Tree == null) { throw new PAT.Common.ParsingException("There is no body for if expression!", iftag); }
                        }
                        DebugLocation(544, 157);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:544:157: ( 'else' s2= statement )?
                        int alt65 = 2;
                        try
                        {
                            DebugEnterSubRule(65);
                            try
                            {
                                DebugEnterDecision(65, decisionCanBacktrack[65]);
                                int LA65_0 = input.LA(1);

                                if ((LA65_0 == 132))
                                {
                                    int LA65_1 = input.LA(2);

                                    if ((EvaluatePredicate(synpred116_PNTree_fragment)))
                                    {
                                        alt65 = 1;
                                    }
                                }
                            }
                            finally { DebugExitDecision(65); }
                            switch (alt65)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:544:158: 'else' s2= statement
                                    {
                                        DebugLocation(544, 158);
                                        string_literal222 = (IToken)Match(input, 132, Follow._132_in_ifExpression2464); if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_132.Add(string_literal222);

                                        DebugLocation(544, 167);
                                        PushFollow(Follow._statement_in_ifExpression2468);
                                        s2 = statement();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_statement.Add(s2.Tree);

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(65); }



                        {
                            // AST REWRITE
                            // elements: 131, expression, s2, s1
                            // token labels: 
                            // rule labels: retval, s2, s1
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                RewriteRuleSubtreeStream stream_s2 = new RewriteRuleSubtreeStream(adaptor, "rule s2", s2 != null ? s2.Tree : null);
                                RewriteRuleSubtreeStream stream_s1 = new RewriteRuleSubtreeStream(adaptor, "rule s1", s1 != null ? s1.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 544:181: -> ^( 'if' expression $s1 ( $s2)? )
                                {
                                    DebugLocation(544, 184);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:544:184: ^( 'if' expression $s1 ( $s2)? )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(544, 186);
                                        root_1 = (CommonTree)adaptor.BecomeRoot(stream_131.NextNode(), root_1);

                                        DebugLocation(544, 191);
                                        adaptor.AddChild(root_1, stream_expression.NextTree());
                                        DebugLocation(544, 202);
                                        adaptor.AddChild(root_1, stream_s1.NextTree());
                                        DebugLocation(544, 206);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:544:206: ( $s2)?
                                        if (stream_s2.HasNext)
                                        {
                                            DebugLocation(544, 206);
                                            adaptor.AddChild(root_1, stream_s2.NextTree());

                                        }
                                        stream_s2.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("ifExpression", 28);
                    LeaveRule("ifExpression", 28);
                    Leave_ifExpression();
                    if (state.backtracking > 0) { Memoize(input, 28, ifExpression_StartIndex); }
                }
                DebugLocation(545, 1);
            }
            finally { DebugExitRule(GrammarFileName, "ifExpression"); }
            return retval;

        }
        // $ANTLR end "ifExpression"

        public class whileExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_whileExpression();
        partial void Leave_whileExpression();

        // $ANTLR start "whileExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:547:1: whileExpression : whiletag= 'while' '(' expression ')' s1= statement -> ^( 'while' expression statement ) ;
        [GrammarRule("whileExpression")]
        private PNTreeParser.whileExpression_return whileExpression()
        {
            Enter_whileExpression();
            EnterRule("whileExpression", 29);
            TraceIn("whileExpression", 29);
            PNTreeParser.whileExpression_return retval = new PNTreeParser.whileExpression_return();
            retval.Start = (IToken)input.LT(1);
            int whileExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken whiletag = null;
            IToken char_literal223 = null;
            IToken char_literal225 = null;
            PNTreeParser.statement_return s1 = default(PNTreeParser.statement_return);
            PNTreeParser.expression_return expression224 = default(PNTreeParser.expression_return);

            CommonTree whiletag_tree = null;
            CommonTree char_literal223_tree = null;
            CommonTree char_literal225_tree = null;
            RewriteRuleITokenStream stream_133 = new RewriteRuleITokenStream(adaptor, "token 133");
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            RewriteRuleSubtreeStream stream_statement = new RewriteRuleSubtreeStream(adaptor, "rule statement");
            paraphrases.Push("in while expression");
            try
            {
                DebugEnterRule(GrammarFileName, "whileExpression");
                DebugLocation(547, 8);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 29)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:550:2: (whiletag= 'while' '(' expression ')' s1= statement -> ^( 'while' expression statement ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:550:4: whiletag= 'while' '(' expression ')' s1= statement
                    {
                        DebugLocation(550, 12);
                        whiletag = (IToken)Match(input, 133, Follow._133_in_whileExpression2512); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_133.Add(whiletag);

                        DebugLocation(550, 21);
                        char_literal223 = (IToken)Match(input, 72, Follow._72_in_whileExpression2514); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_72.Add(char_literal223);

                        DebugLocation(550, 25);
                        PushFollow(Follow._expression_in_whileExpression2516);
                        expression224 = expression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_expression.Add(expression224.Tree);
                        DebugLocation(550, 36);
                        char_literal225 = (IToken)Match(input, 73, Follow._73_in_whileExpression2518); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_73.Add(char_literal225);

                        DebugLocation(550, 42);
                        PushFollow(Follow._statement_in_whileExpression2522);
                        s1 = statement();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_statement.Add(s1.Tree);
                        DebugLocation(550, 54);
                        if (state.backtracking == 0)
                        {
                            if (s1.Tree == null) { throw new PAT.Common.ParsingException("There is no body for while expression!", whiletag); }
                        }


                        {
                            // AST REWRITE
                            // elements: statement, expression, 133
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 550:169: -> ^( 'while' expression statement )
                                {
                                    DebugLocation(550, 172);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:550:172: ^( 'while' expression statement )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(550, 174);
                                        root_1 = (CommonTree)adaptor.BecomeRoot(stream_133.NextNode(), root_1);

                                        DebugLocation(550, 182);
                                        adaptor.AddChild(root_1, stream_expression.NextTree());
                                        DebugLocation(550, 193);
                                        adaptor.AddChild(root_1, stream_statement.NextTree());

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("whileExpression", 29);
                    LeaveRule("whileExpression", 29);
                    Leave_whileExpression();
                    if (state.backtracking > 0) { Memoize(input, 29, whileExpression_StartIndex); }
                }
                DebugLocation(551, 8);
            }
            finally { DebugExitRule(GrammarFileName, "whileExpression"); }
            return retval;

        }
        // $ANTLR end "whileExpression"

        public class recordExpression_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_recordExpression();
        partial void Leave_recordExpression();

        // $ANTLR start "recordExpression"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:553:1: recordExpression : '[' recordElement ( ',' recordElement )* ']' -> ^( RECORD_NODE ( recordElement )+ ) ;
        [GrammarRule("recordExpression")]
        private PNTreeParser.recordExpression_return recordExpression()
        {
            Enter_recordExpression();
            EnterRule("recordExpression", 30);
            TraceIn("recordExpression", 30);
            PNTreeParser.recordExpression_return retval = new PNTreeParser.recordExpression_return();
            retval.Start = (IToken)input.LT(1);
            int recordExpression_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal226 = null;
            IToken char_literal228 = null;
            IToken char_literal230 = null;
            PNTreeParser.recordElement_return recordElement227 = default(PNTreeParser.recordElement_return);
            PNTreeParser.recordElement_return recordElement229 = default(PNTreeParser.recordElement_return);

            CommonTree char_literal226_tree = null;
            CommonTree char_literal228_tree = null;
            CommonTree char_literal230_tree = null;
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_109 = new RewriteRuleITokenStream(adaptor, "token 109");
            RewriteRuleITokenStream stream_108 = new RewriteRuleITokenStream(adaptor, "token 108");
            RewriteRuleSubtreeStream stream_recordElement = new RewriteRuleSubtreeStream(adaptor, "rule recordElement");
            paraphrases.Push("in record expression");
            try
            {
                DebugEnterRule(GrammarFileName, "recordExpression");
                DebugLocation(553, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 30)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:556:2: ( '[' recordElement ( ',' recordElement )* ']' -> ^( RECORD_NODE ( recordElement )+ ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:556:4: '[' recordElement ( ',' recordElement )* ']'
                    {
                        DebugLocation(556, 4);
                        char_literal226 = (IToken)Match(input, 108, Follow._108_in_recordExpression2565); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_108.Add(char_literal226);

                        DebugLocation(556, 8);
                        PushFollow(Follow._recordElement_in_recordExpression2567);
                        recordElement227 = recordElement();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_recordElement.Add(recordElement227.Tree);
                        DebugLocation(556, 22);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:556:22: ( ',' recordElement )*
                        try
                        {
                            DebugEnterSubRule(66);
                            while (true)
                            {
                                int alt66 = 2;
                                try
                                {
                                    DebugEnterDecision(66, decisionCanBacktrack[66]);
                                    int LA66_0 = input.LA(1);

                                    if ((LA66_0 == 97))
                                    {
                                        alt66 = 1;
                                    }


                                }
                                finally { DebugExitDecision(66); }
                                switch (alt66)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:556:23: ',' recordElement
                                        {
                                            DebugLocation(556, 23);
                                            char_literal228 = (IToken)Match(input, 97, Follow._97_in_recordExpression2570); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_97.Add(char_literal228);

                                            DebugLocation(556, 27);
                                            PushFollow(Follow._recordElement_in_recordExpression2572);
                                            recordElement229 = recordElement();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_recordElement.Add(recordElement229.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop66;
                                }
                            }

                        loop66:
                            ;

                        }
                        finally { DebugExitSubRule(66); }

                        DebugLocation(556, 43);
                        char_literal230 = (IToken)Match(input, 109, Follow._109_in_recordExpression2576); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_109.Add(char_literal230);



                        {
                            // AST REWRITE
                            // elements: recordElement
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 556:47: -> ^( RECORD_NODE ( recordElement )+ )
                                {
                                    DebugLocation(556, 50);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:556:50: ^( RECORD_NODE ( recordElement )+ )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(556, 52);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(RECORD_NODE, "RECORD_NODE"), root_1);

                                        DebugLocation(556, 64);
                                        if (!(stream_recordElement.HasNext))
                                        {
                                            throw new RewriteEarlyExitException();
                                        }
                                        while (stream_recordElement.HasNext)
                                        {
                                            DebugLocation(556, 64);
                                            adaptor.AddChild(root_1, stream_recordElement.NextTree());

                                        }
                                        stream_recordElement.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("recordExpression", 30);
                    LeaveRule("recordExpression", 30);
                    Leave_recordExpression();
                    if (state.backtracking > 0) { Memoize(input, 30, recordExpression_StartIndex); }
                }
                DebugLocation(557, 1);
            }
            finally { DebugExitRule(GrammarFileName, "recordExpression"); }
            return retval;

        }
        // $ANTLR end "recordExpression"

        public class recordElement_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_recordElement();
        partial void Leave_recordElement();

        // $ANTLR start "recordElement"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:559:1: recordElement : e1= expression ( ( '(' e2= expression ')' ) -> ^( RECORD_ELEMENT_NODE $e1 $e2) | ( '..' e2= expression ) -> ^( RECORD_ELEMENT_RANGE_NODE $e1 $e2) | -> ^( RECORD_ELEMENT_NODE $e1) ) ;
        [GrammarRule("recordElement")]
        private PNTreeParser.recordElement_return recordElement()
        {
            Enter_recordElement();
            EnterRule("recordElement", 31);
            TraceIn("recordElement", 31);
            PNTreeParser.recordElement_return retval = new PNTreeParser.recordElement_return();
            retval.Start = (IToken)input.LT(1);
            int recordElement_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal231 = null;
            IToken char_literal232 = null;
            IToken string_literal233 = null;
            PNTreeParser.expression_return e1 = default(PNTreeParser.expression_return);
            PNTreeParser.expression_return e2 = default(PNTreeParser.expression_return);

            CommonTree char_literal231_tree = null;
            CommonTree char_literal232_tree = null;
            CommonTree string_literal233_tree = null;
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");
            RewriteRuleITokenStream stream_130 = new RewriteRuleITokenStream(adaptor, "token 130");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            try
            {
                DebugEnterRule(GrammarFileName, "recordElement");
                DebugLocation(559, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 31)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:560:2: (e1= expression ( ( '(' e2= expression ')' ) -> ^( RECORD_ELEMENT_NODE $e1 $e2) | ( '..' e2= expression ) -> ^( RECORD_ELEMENT_RANGE_NODE $e1 $e2) | -> ^( RECORD_ELEMENT_NODE $e1) ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:560:4: e1= expression ( ( '(' e2= expression ')' ) -> ^( RECORD_ELEMENT_NODE $e1 $e2) | ( '..' e2= expression ) -> ^( RECORD_ELEMENT_RANGE_NODE $e1 $e2) | -> ^( RECORD_ELEMENT_NODE $e1) )
                    {
                        DebugLocation(560, 6);
                        PushFollow(Follow._expression_in_recordElement2599);
                        e1 = expression();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_expression.Add(e1.Tree);
                        DebugLocation(561, 3);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:561:3: ( ( '(' e2= expression ')' ) -> ^( RECORD_ELEMENT_NODE $e1 $e2) | ( '..' e2= expression ) -> ^( RECORD_ELEMENT_RANGE_NODE $e1 $e2) | -> ^( RECORD_ELEMENT_NODE $e1) )
                        int alt67 = 3;
                        try
                        {
                            DebugEnterSubRule(67);
                            try
                            {
                                DebugEnterDecision(67, decisionCanBacktrack[67]);
                                switch (input.LA(1))
                                {
                                    case 72:
                                        {
                                            alt67 = 1;
                                        }
                                        break;
                                    case 130:
                                        {
                                            alt67 = 2;
                                        }
                                        break;
                                    case EOF:
                                    case 97:
                                    case 109:
                                        {
                                            alt67 = 3;
                                        }
                                        break;
                                    default:
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 67, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                }

                            }
                            finally { DebugExitDecision(67); }
                            switch (alt67)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:562:4: ( '(' e2= expression ')' )
                                    {
                                        DebugLocation(562, 4);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:562:4: ( '(' e2= expression ')' )
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:562:5: '(' e2= expression ')'
                                        {
                                            DebugLocation(562, 5);
                                            char_literal231 = (IToken)Match(input, 72, Follow._72_in_recordElement2610); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_72.Add(char_literal231);

                                            DebugLocation(562, 11);
                                            PushFollow(Follow._expression_in_recordElement2614);
                                            e2 = expression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_expression.Add(e2.Tree);
                                            DebugLocation(562, 23);
                                            char_literal232 = (IToken)Match(input, 73, Follow._73_in_recordElement2616); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_73.Add(char_literal232);


                                        }



                                        {
                                            // AST REWRITE
                                            // elements: e2, e1
                                            // token labels: 
                                            // rule labels: retval, e1, e2
                                            // token list labels: 
                                            // rule list labels: 
                                            // wildcard labels: 
                                            if (state.backtracking == 0)
                                            {
                                                retval.Tree = root_0;
                                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                                RewriteRuleSubtreeStream stream_e1 = new RewriteRuleSubtreeStream(adaptor, "rule e1", e1 != null ? e1.Tree : null);
                                                RewriteRuleSubtreeStream stream_e2 = new RewriteRuleSubtreeStream(adaptor, "rule e2", e2 != null ? e2.Tree : null);

                                                root_0 = (CommonTree)adaptor.Nil();
                                                // 562:28: -> ^( RECORD_ELEMENT_NODE $e1 $e2)
                                                {
                                                    DebugLocation(562, 31);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:562:31: ^( RECORD_ELEMENT_NODE $e1 $e2)
                                                    {
                                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                        DebugLocation(562, 33);
                                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(RECORD_ELEMENT_NODE, "RECORD_ELEMENT_NODE"), root_1);

                                                        DebugLocation(562, 53);
                                                        adaptor.AddChild(root_1, stream_e1.NextTree());
                                                        DebugLocation(562, 57);
                                                        adaptor.AddChild(root_1, stream_e2.NextTree());

                                                        adaptor.AddChild(root_0, root_1);
                                                    }

                                                }

                                                retval.Tree = root_0;
                                            }
                                        }

                                    }
                                    break;
                                case 2:
                                    DebugEnterAlt(2);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:563:6: ( '..' e2= expression )
                                    {
                                        DebugLocation(563, 6);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:563:6: ( '..' e2= expression )
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:563:7: '..' e2= expression
                                        {
                                            DebugLocation(563, 7);
                                            string_literal233 = (IToken)Match(input, 130, Follow._130_in_recordElement2637); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_130.Add(string_literal233);

                                            DebugLocation(563, 14);
                                            PushFollow(Follow._expression_in_recordElement2641);
                                            e2 = expression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_expression.Add(e2.Tree);

                                        }



                                        {
                                            // AST REWRITE
                                            // elements: e2, e1
                                            // token labels: 
                                            // rule labels: retval, e1, e2
                                            // token list labels: 
                                            // rule list labels: 
                                            // wildcard labels: 
                                            if (state.backtracking == 0)
                                            {
                                                retval.Tree = root_0;
                                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                                RewriteRuleSubtreeStream stream_e1 = new RewriteRuleSubtreeStream(adaptor, "rule e1", e1 != null ? e1.Tree : null);
                                                RewriteRuleSubtreeStream stream_e2 = new RewriteRuleSubtreeStream(adaptor, "rule e2", e2 != null ? e2.Tree : null);

                                                root_0 = (CommonTree)adaptor.Nil();
                                                // 563:28: -> ^( RECORD_ELEMENT_RANGE_NODE $e1 $e2)
                                                {
                                                    DebugLocation(563, 31);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:563:31: ^( RECORD_ELEMENT_RANGE_NODE $e1 $e2)
                                                    {
                                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                        DebugLocation(563, 33);
                                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(RECORD_ELEMENT_RANGE_NODE, "RECORD_ELEMENT_RANGE_NODE"), root_1);

                                                        DebugLocation(563, 59);
                                                        adaptor.AddChild(root_1, stream_e1.NextTree());
                                                        DebugLocation(563, 63);
                                                        adaptor.AddChild(root_1, stream_e2.NextTree());

                                                        adaptor.AddChild(root_0, root_1);
                                                    }

                                                }

                                                retval.Tree = root_0;
                                            }
                                        }

                                    }
                                    break;
                                case 3:
                                    DebugEnterAlt(3);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:564:6: 
                                    {

                                        {
                                            // AST REWRITE
                                            // elements: e1
                                            // token labels: 
                                            // rule labels: retval, e1
                                            // token list labels: 
                                            // rule list labels: 
                                            // wildcard labels: 
                                            if (state.backtracking == 0)
                                            {
                                                retval.Tree = root_0;
                                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                                RewriteRuleSubtreeStream stream_e1 = new RewriteRuleSubtreeStream(adaptor, "rule e1", e1 != null ? e1.Tree : null);

                                                root_0 = (CommonTree)adaptor.Nil();
                                                // 564:6: -> ^( RECORD_ELEMENT_NODE $e1)
                                                {
                                                    DebugLocation(564, 9);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:564:9: ^( RECORD_ELEMENT_NODE $e1)
                                                    {
                                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                        DebugLocation(564, 11);
                                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(RECORD_ELEMENT_NODE, "RECORD_ELEMENT_NODE"), root_1);

                                                        DebugLocation(564, 31);
                                                        adaptor.AddChild(root_1, stream_e1.NextTree());

                                                        adaptor.AddChild(root_0, root_1);
                                                    }

                                                }

                                                retval.Tree = root_0;
                                            }
                                        }

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(67); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("recordElement", 31);
                    LeaveRule("recordElement", 31);
                    Leave_recordElement();
                    if (state.backtracking > 0) { Memoize(input, 31, recordElement_StartIndex); }
                }
                DebugLocation(566, 1);
            }
            finally { DebugExitRule(GrammarFileName, "recordElement"); }
            return retval;

        }
        // $ANTLR end "recordElement"

        public class definition_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_definition();
        partial void Leave_definition();

        // $ANTLR start "definition"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:568:1: definition : (name= ID ( '(' ( ID ( ',' ID )* )? ')' )? '=' interleaveExpr ';' -> ^( DEFINITION_NODE ID ( ID )* interleaveExpr ) | 'Process' pname= STRING ( '(' ( ID ( ',' ID )* )? ')' )? ':' ( transition )* ';' -> ^( PROCESS_NODE $pname ( ID )* ( transition )* ) );
        [GrammarRule("definition")]
        private PNTreeParser.definition_return definition()
        {
            Enter_definition();
            EnterRule("definition", 32);
            TraceIn("definition", 32);
            PNTreeParser.definition_return retval = new PNTreeParser.definition_return();
            retval.Start = (IToken)input.LT(1);
            int definition_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken name = null;
            IToken pname = null;
            IToken char_literal234 = null;
            IToken ID235 = null;
            IToken char_literal236 = null;
            IToken ID237 = null;
            IToken char_literal238 = null;
            IToken char_literal239 = null;
            IToken char_literal241 = null;
            IToken string_literal242 = null;
            IToken char_literal243 = null;
            IToken ID244 = null;
            IToken char_literal245 = null;
            IToken ID246 = null;
            IToken char_literal247 = null;
            IToken char_literal248 = null;
            IToken char_literal250 = null;
            PNTreeParser.interleaveExpr_return interleaveExpr240 = default(PNTreeParser.interleaveExpr_return);
            PNTreeParser.transition_return transition249 = default(PNTreeParser.transition_return);

            CommonTree name_tree = null;
            CommonTree pname_tree = null;
            CommonTree char_literal234_tree = null;
            CommonTree ID235_tree = null;
            CommonTree char_literal236_tree = null;
            CommonTree ID237_tree = null;
            CommonTree char_literal238_tree = null;
            CommonTree char_literal239_tree = null;
            CommonTree char_literal241_tree = null;
            CommonTree string_literal242_tree = null;
            CommonTree char_literal243_tree = null;
            CommonTree ID244_tree = null;
            CommonTree char_literal245_tree = null;
            CommonTree ID246_tree = null;
            CommonTree char_literal247_tree = null;
            CommonTree char_literal248_tree = null;
            CommonTree char_literal250_tree = null;
            RewriteRuleITokenStream stream_134 = new RewriteRuleITokenStream(adaptor, "token 134");
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_107 = new RewriteRuleITokenStream(adaptor, "token 107");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_129 = new RewriteRuleITokenStream(adaptor, "token 129");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");
            RewriteRuleITokenStream stream_STRING = new RewriteRuleITokenStream(adaptor, "token STRING");
            RewriteRuleSubtreeStream stream_transition = new RewriteRuleSubtreeStream(adaptor, "rule transition");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            paraphrases.Push("in process definition");
            try
            {
                DebugEnterRule(GrammarFileName, "definition");
                DebugLocation(568, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 32)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:2: (name= ID ( '(' ( ID ( ',' ID )* )? ')' )? '=' interleaveExpr ';' -> ^( DEFINITION_NODE ID ( ID )* interleaveExpr ) | 'Process' pname= STRING ( '(' ( ID ( ',' ID )* )? ')' )? ':' ( transition )* ';' -> ^( PROCESS_NODE $pname ( ID )* ( transition )* ) )
                    int alt75 = 2;
                    try
                    {
                        DebugEnterDecision(75, decisionCanBacktrack[75]);
                        int LA75_0 = input.LA(1);

                        if ((LA75_0 == ID))
                        {
                            alt75 = 1;
                        }
                        else if ((LA75_0 == 134))
                        {
                            alt75 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 75, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(75); }
                    switch (alt75)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:4: name= ID ( '(' ( ID ( ',' ID )* )? ')' )? '=' interleaveExpr ';'
                            {
                                DebugLocation(571, 8);
                                name = (IToken)Match(input, ID, Follow._ID_in_definition2699); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(name);

                                DebugLocation(571, 12);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:12: ( '(' ( ID ( ',' ID )* )? ')' )?
                                int alt70 = 2;
                                try
                                {
                                    DebugEnterSubRule(70);
                                    try
                                    {
                                        DebugEnterDecision(70, decisionCanBacktrack[70]);
                                        int LA70_0 = input.LA(1);

                                        if ((LA70_0 == 72))
                                        {
                                            alt70 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(70); }
                                    switch (alt70)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:13: '(' ( ID ( ',' ID )* )? ')'
                                            {
                                                DebugLocation(571, 13);
                                                char_literal234 = (IToken)Match(input, 72, Follow._72_in_definition2702); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_72.Add(char_literal234);

                                                DebugLocation(571, 17);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:17: ( ID ( ',' ID )* )?
                                                int alt69 = 2;
                                                try
                                                {
                                                    DebugEnterSubRule(69);
                                                    try
                                                    {
                                                        DebugEnterDecision(69, decisionCanBacktrack[69]);
                                                        int LA69_0 = input.LA(1);

                                                        if ((LA69_0 == ID))
                                                        {
                                                            alt69 = 1;
                                                        }
                                                    }
                                                    finally { DebugExitDecision(69); }
                                                    switch (alt69)
                                                    {
                                                        case 1:
                                                            DebugEnterAlt(1);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:18: ID ( ',' ID )*
                                                            {
                                                                DebugLocation(571, 18);
                                                                ID235 = (IToken)Match(input, ID, Follow._ID_in_definition2705); if (state.failed) return retval;
                                                                if (state.backtracking == 0) stream_ID.Add(ID235);

                                                                DebugLocation(571, 21);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:21: ( ',' ID )*
                                                                try
                                                                {
                                                                    DebugEnterSubRule(68);
                                                                    while (true)
                                                                    {
                                                                        int alt68 = 2;
                                                                        try
                                                                        {
                                                                            DebugEnterDecision(68, decisionCanBacktrack[68]);
                                                                            int LA68_0 = input.LA(1);

                                                                            if ((LA68_0 == 97))
                                                                            {
                                                                                alt68 = 1;
                                                                            }


                                                                        }
                                                                        finally { DebugExitDecision(68); }
                                                                        switch (alt68)
                                                                        {
                                                                            case 1:
                                                                                DebugEnterAlt(1);
                                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:22: ',' ID
                                                                                {
                                                                                    DebugLocation(571, 22);
                                                                                    char_literal236 = (IToken)Match(input, 97, Follow._97_in_definition2708); if (state.failed) return retval;
                                                                                    if (state.backtracking == 0) stream_97.Add(char_literal236);

                                                                                    DebugLocation(571, 26);
                                                                                    ID237 = (IToken)Match(input, ID, Follow._ID_in_definition2710); if (state.failed) return retval;
                                                                                    if (state.backtracking == 0) stream_ID.Add(ID237);


                                                                                }
                                                                                break;

                                                                            default:
                                                                                goto loop68;
                                                                        }
                                                                    }

                                                                loop68:
                                                                    ;

                                                                }
                                                                finally { DebugExitSubRule(68); }


                                                            }
                                                            break;

                                                    }
                                                }
                                                finally { DebugExitSubRule(69); }

                                                DebugLocation(571, 34);
                                                char_literal238 = (IToken)Match(input, 73, Follow._73_in_definition2717); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_73.Add(char_literal238);


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(70); }

                                DebugLocation(571, 40);
                                char_literal239 = (IToken)Match(input, 107, Follow._107_in_definition2721); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_107.Add(char_literal239);

                                DebugLocation(571, 44);
                                PushFollow(Follow._interleaveExpr_in_definition2723);
                                interleaveExpr240 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr240.Tree);
                                DebugLocation(571, 59);
                                char_literal241 = (IToken)Match(input, 68, Follow._68_in_definition2725); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal241);

                                DebugLocation(571, 63);
                                if (state.backtracking == 0)
                                {
                                    DefinitionNames.Add(name);
                                }


                                {
                                    // AST REWRITE
                                    // elements: ID, ID, interleaveExpr
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 571:93: -> ^( DEFINITION_NODE ID ( ID )* interleaveExpr )
                                        {
                                            DebugLocation(571, 96);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:96: ^( DEFINITION_NODE ID ( ID )* interleaveExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(571, 98);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(DEFINITION_NODE, "DEFINITION_NODE"), root_1);

                                                DebugLocation(571, 114);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(571, 117);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:571:117: ( ID )*
                                                while (stream_ID.HasNext)
                                                {
                                                    DebugLocation(571, 117);
                                                    adaptor.AddChild(root_1, stream_ID.NextNode());

                                                }
                                                stream_ID.Reset();
                                                DebugLocation(571, 121);
                                                adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:4: 'Process' pname= STRING ( '(' ( ID ( ',' ID )* )? ')' )? ':' ( transition )* ';'
                            {
                                DebugLocation(572, 4);
                                string_literal242 = (IToken)Match(input, 134, Follow._134_in_definition2745); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_134.Add(string_literal242);

                                DebugLocation(572, 19);
                                pname = (IToken)Match(input, STRING, Follow._STRING_in_definition2749); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_STRING.Add(pname);

                                DebugLocation(572, 28);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:28: ( '(' ( ID ( ',' ID )* )? ')' )?
                                int alt73 = 2;
                                try
                                {
                                    DebugEnterSubRule(73);
                                    try
                                    {
                                        DebugEnterDecision(73, decisionCanBacktrack[73]);
                                        int LA73_0 = input.LA(1);

                                        if ((LA73_0 == 72))
                                        {
                                            alt73 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(73); }
                                    switch (alt73)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:29: '(' ( ID ( ',' ID )* )? ')'
                                            {
                                                DebugLocation(572, 29);
                                                char_literal243 = (IToken)Match(input, 72, Follow._72_in_definition2753); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_72.Add(char_literal243);

                                                DebugLocation(572, 33);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:33: ( ID ( ',' ID )* )?
                                                int alt72 = 2;
                                                try
                                                {
                                                    DebugEnterSubRule(72);
                                                    try
                                                    {
                                                        DebugEnterDecision(72, decisionCanBacktrack[72]);
                                                        int LA72_0 = input.LA(1);

                                                        if ((LA72_0 == ID))
                                                        {
                                                            alt72 = 1;
                                                        }
                                                    }
                                                    finally { DebugExitDecision(72); }
                                                    switch (alt72)
                                                    {
                                                        case 1:
                                                            DebugEnterAlt(1);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:34: ID ( ',' ID )*
                                                            {
                                                                DebugLocation(572, 34);
                                                                ID244 = (IToken)Match(input, ID, Follow._ID_in_definition2756); if (state.failed) return retval;
                                                                if (state.backtracking == 0) stream_ID.Add(ID244);

                                                                DebugLocation(572, 37);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:37: ( ',' ID )*
                                                                try
                                                                {
                                                                    DebugEnterSubRule(71);
                                                                    while (true)
                                                                    {
                                                                        int alt71 = 2;
                                                                        try
                                                                        {
                                                                            DebugEnterDecision(71, decisionCanBacktrack[71]);
                                                                            int LA71_0 = input.LA(1);

                                                                            if ((LA71_0 == 97))
                                                                            {
                                                                                alt71 = 1;
                                                                            }


                                                                        }
                                                                        finally { DebugExitDecision(71); }
                                                                        switch (alt71)
                                                                        {
                                                                            case 1:
                                                                                DebugEnterAlt(1);
                                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:38: ',' ID
                                                                                {
                                                                                    DebugLocation(572, 38);
                                                                                    char_literal245 = (IToken)Match(input, 97, Follow._97_in_definition2759); if (state.failed) return retval;
                                                                                    if (state.backtracking == 0) stream_97.Add(char_literal245);

                                                                                    DebugLocation(572, 42);
                                                                                    ID246 = (IToken)Match(input, ID, Follow._ID_in_definition2761); if (state.failed) return retval;
                                                                                    if (state.backtracking == 0) stream_ID.Add(ID246);


                                                                                }
                                                                                break;

                                                                            default:
                                                                                goto loop71;
                                                                        }
                                                                    }

                                                                loop71:
                                                                    ;

                                                                }
                                                                finally { DebugExitSubRule(71); }


                                                            }
                                                            break;

                                                    }
                                                }
                                                finally { DebugExitSubRule(72); }

                                                DebugLocation(572, 50);
                                                char_literal247 = (IToken)Match(input, 73, Follow._73_in_definition2768); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_73.Add(char_literal247);


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(73); }

                                DebugLocation(572, 56);
                                char_literal248 = (IToken)Match(input, 129, Follow._129_in_definition2772); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_129.Add(char_literal248);

                                DebugLocation(572, 60);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:60: ( transition )*
                                try
                                {
                                    DebugEnterSubRule(74);
                                    while (true)
                                    {
                                        int alt74 = 2;
                                        try
                                        {
                                            DebugEnterDecision(74, decisionCanBacktrack[74]);
                                            int LA74_0 = input.LA(1);

                                            if ((LA74_0 == STRING))
                                            {
                                                alt74 = 1;
                                            }


                                        }
                                        finally { DebugExitDecision(74); }
                                        switch (alt74)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: transition
                                                {
                                                    DebugLocation(572, 60);
                                                    PushFollow(Follow._transition_in_definition2774);
                                                    transition249 = transition();
                                                    PopFollow();
                                                    if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_transition.Add(transition249.Tree);

                                                }
                                                break;

                                            default:
                                                goto loop74;
                                        }
                                    }

                                loop74:
                                    ;

                                }
                                finally { DebugExitSubRule(74); }

                                DebugLocation(572, 72);
                                char_literal250 = (IToken)Match(input, 68, Follow._68_in_definition2777); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_68.Add(char_literal250);

                                DebugLocation(572, 77);
                                if (state.backtracking == 0)
                                {
                                    DefinitionNames.Add(pname);
                                }


                                {
                                    // AST REWRITE
                                    // elements: ID, transition, pname
                                    // token labels: pname
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_pname = new RewriteRuleITokenStream(adaptor, "token pname", pname);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 572:108: -> ^( PROCESS_NODE $pname ( ID )* ( transition )* )
                                        {
                                            DebugLocation(572, 111);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:111: ^( PROCESS_NODE $pname ( ID )* ( transition )* )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(572, 113);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(PROCESS_NODE, "PROCESS_NODE"), root_1);

                                                DebugLocation(572, 126);
                                                adaptor.AddChild(root_1, stream_pname.NextNode());
                                                DebugLocation(572, 133);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:133: ( ID )*
                                                while (stream_ID.HasNext)
                                                {
                                                    DebugLocation(572, 133);
                                                    adaptor.AddChild(root_1, stream_ID.NextNode());

                                                }
                                                stream_ID.Reset();
                                                DebugLocation(572, 137);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:572:137: ( transition )*
                                                while (stream_transition.HasNext)
                                                {
                                                    DebugLocation(572, 137);
                                                    adaptor.AddChild(root_1, stream_transition.NextTree());

                                                }
                                                stream_transition.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("definition", 32);
                    LeaveRule("definition", 32);
                    Leave_definition();
                    if (state.backtracking > 0) { Memoize(input, 32, definition_StartIndex); }
                }
                DebugLocation(573, 1);
            }
            finally { DebugExitRule(GrammarFileName, "definition"); }
            return retval;

        }
        // $ANTLR end "definition"

        public class transition_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_transition();
        partial void Leave_transition();

        // $ANTLR start "transition"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:576:1: transition : from= STRING '--' ( select )? ( '[' conditionalOrExpression ']' )? '##@@' eventT '@@##' ( block )? '-->' to= STRING -> ^( TRANSITION_NODE $from ( select )? ( conditionalOrExpression )? eventT ( block )? $to) ;
        [GrammarRule("transition")]
        private PNTreeParser.transition_return transition()
        {
            Enter_transition();
            EnterRule("transition", 33);
            TraceIn("transition", 33);
            PNTreeParser.transition_return retval = new PNTreeParser.transition_return();
            retval.Start = (IToken)input.LT(1);
            int transition_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken from = null;
            IToken to = null;
            IToken string_literal251 = null;
            IToken char_literal253 = null;
            IToken char_literal255 = null;
            IToken string_literal256 = null;
            IToken string_literal258 = null;
            IToken string_literal260 = null;
            PNTreeParser.select_return select252 = default(PNTreeParser.select_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression254 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.eventT_return eventT257 = default(PNTreeParser.eventT_return);
            PNTreeParser.block_return block259 = default(PNTreeParser.block_return);

            CommonTree from_tree = null;
            CommonTree to_tree = null;
            CommonTree string_literal251_tree = null;
            CommonTree char_literal253_tree = null;
            CommonTree char_literal255_tree = null;
            CommonTree string_literal256_tree = null;
            CommonTree string_literal258_tree = null;
            CommonTree string_literal260_tree = null;
            RewriteRuleITokenStream stream_125 = new RewriteRuleITokenStream(adaptor, "token 125");
            RewriteRuleITokenStream stream_135 = new RewriteRuleITokenStream(adaptor, "token 135");
            RewriteRuleITokenStream stream_109 = new RewriteRuleITokenStream(adaptor, "token 109");
            RewriteRuleITokenStream stream_108 = new RewriteRuleITokenStream(adaptor, "token 108");
            RewriteRuleITokenStream stream_136 = new RewriteRuleITokenStream(adaptor, "token 136");
            RewriteRuleITokenStream stream_137 = new RewriteRuleITokenStream(adaptor, "token 137");
            RewriteRuleITokenStream stream_STRING = new RewriteRuleITokenStream(adaptor, "token STRING");
            RewriteRuleSubtreeStream stream_select = new RewriteRuleSubtreeStream(adaptor, "rule select");
            RewriteRuleSubtreeStream stream_eventT = new RewriteRuleSubtreeStream(adaptor, "rule eventT");
            RewriteRuleSubtreeStream stream_conditionalOrExpression = new RewriteRuleSubtreeStream(adaptor, "rule conditionalOrExpression");
            RewriteRuleSubtreeStream stream_block = new RewriteRuleSubtreeStream(adaptor, "rule block");
            paraphrases.Push("in transition definition");
            try
            {
                DebugEnterRule(GrammarFileName, "transition");
                DebugLocation(576, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 33)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:2: (from= STRING '--' ( select )? ( '[' conditionalOrExpression ']' )? '##@@' eventT '@@##' ( block )? '-->' to= STRING -> ^( TRANSITION_NODE $from ( select )? ( conditionalOrExpression )? eventT ( block )? $to) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:4: from= STRING '--' ( select )? ( '[' conditionalOrExpression ']' )? '##@@' eventT '@@##' ( block )? '-->' to= STRING
                    {
                        DebugLocation(579, 8);
                        from = (IToken)Match(input, STRING, Follow._STRING_in_transition2820); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_STRING.Add(from);

                        DebugLocation(579, 16);
                        string_literal251 = (IToken)Match(input, 125, Follow._125_in_transition2822); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_125.Add(string_literal251);

                        DebugLocation(579, 21);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:21: ( select )?
                        int alt76 = 2;
                        try
                        {
                            DebugEnterSubRule(76);
                            try
                            {
                                DebugEnterDecision(76, decisionCanBacktrack[76]);
                                int LA76_0 = input.LA(1);

                                if ((LA76_0 == 138))
                                {
                                    alt76 = 1;
                                }
                            }
                            finally { DebugExitDecision(76); }
                            switch (alt76)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: select
                                    {
                                        DebugLocation(579, 21);
                                        PushFollow(Follow._select_in_transition2824);
                                        select252 = select();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_select.Add(select252.Tree);

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(76); }

                        DebugLocation(579, 29);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:29: ( '[' conditionalOrExpression ']' )?
                        int alt77 = 2;
                        try
                        {
                            DebugEnterSubRule(77);
                            try
                            {
                                DebugEnterDecision(77, decisionCanBacktrack[77]);
                                int LA77_0 = input.LA(1);

                                if ((LA77_0 == 108))
                                {
                                    alt77 = 1;
                                }
                            }
                            finally { DebugExitDecision(77); }
                            switch (alt77)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:30: '[' conditionalOrExpression ']'
                                    {
                                        DebugLocation(579, 30);
                                        char_literal253 = (IToken)Match(input, 108, Follow._108_in_transition2828); if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_108.Add(char_literal253);

                                        DebugLocation(579, 34);
                                        PushFollow(Follow._conditionalOrExpression_in_transition2830);
                                        conditionalOrExpression254 = conditionalOrExpression();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression254.Tree);
                                        DebugLocation(579, 58);
                                        char_literal255 = (IToken)Match(input, 109, Follow._109_in_transition2832); if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_109.Add(char_literal255);


                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(77); }

                        DebugLocation(579, 64);
                        string_literal256 = (IToken)Match(input, 135, Follow._135_in_transition2836); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_135.Add(string_literal256);

                        DebugLocation(579, 71);
                        PushFollow(Follow._eventT_in_transition2838);
                        eventT257 = eventT();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_eventT.Add(eventT257.Tree);
                        DebugLocation(579, 78);
                        string_literal258 = (IToken)Match(input, 136, Follow._136_in_transition2840); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_136.Add(string_literal258);

                        DebugLocation(579, 85);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:85: ( block )?
                        int alt78 = 2;
                        try
                        {
                            DebugEnterSubRule(78);
                            try
                            {
                                DebugEnterDecision(78, decisionCanBacktrack[78]);
                                int LA78_0 = input.LA(1);

                                if ((LA78_0 == 99))
                                {
                                    alt78 = 1;
                                }
                            }
                            finally { DebugExitDecision(78); }
                            switch (alt78)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:86: block
                                    {
                                        DebugLocation(579, 86);
                                        PushFollow(Follow._block_in_transition2843);
                                        block259 = block();
                                        PopFollow();
                                        if (state.failed) return retval;
                                        if (state.backtracking == 0) stream_block.Add(block259.Tree);

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(78); }

                        DebugLocation(579, 95);
                        string_literal260 = (IToken)Match(input, 137, Follow._137_in_transition2848); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_137.Add(string_literal260);

                        DebugLocation(579, 103);
                        to = (IToken)Match(input, STRING, Follow._STRING_in_transition2852); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_STRING.Add(to);



                        {
                            // AST REWRITE
                            // elements: to, block, from, select, eventT, conditionalOrExpression
                            // token labels: to, from
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleITokenStream stream_to = new RewriteRuleITokenStream(adaptor, "token to", to);
                                RewriteRuleITokenStream stream_from = new RewriteRuleITokenStream(adaptor, "token from", from);
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 579:111: -> ^( TRANSITION_NODE $from ( select )? ( conditionalOrExpression )? eventT ( block )? $to)
                                {
                                    DebugLocation(579, 114);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:114: ^( TRANSITION_NODE $from ( select )? ( conditionalOrExpression )? eventT ( block )? $to)
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(579, 116);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(TRANSITION_NODE, "TRANSITION_NODE"), root_1);

                                        DebugLocation(579, 132);
                                        adaptor.AddChild(root_1, stream_from.NextNode());
                                        DebugLocation(579, 138);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:138: ( select )?
                                        if (stream_select.HasNext)
                                        {
                                            DebugLocation(579, 138);
                                            adaptor.AddChild(root_1, stream_select.NextTree());

                                        }
                                        stream_select.Reset();
                                        DebugLocation(579, 146);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:146: ( conditionalOrExpression )?
                                        if (stream_conditionalOrExpression.HasNext)
                                        {
                                            DebugLocation(579, 146);
                                            adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());

                                        }
                                        stream_conditionalOrExpression.Reset();
                                        DebugLocation(579, 171);
                                        adaptor.AddChild(root_1, stream_eventT.NextTree());
                                        DebugLocation(579, 178);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:579:178: ( block )?
                                        if (stream_block.HasNext)
                                        {
                                            DebugLocation(579, 178);
                                            adaptor.AddChild(root_1, stream_block.NextTree());

                                        }
                                        stream_block.Reset();
                                        DebugLocation(579, 185);
                                        adaptor.AddChild(root_1, stream_to.NextNode());

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("transition", 33);
                    LeaveRule("transition", 33);
                    Leave_transition();
                    if (state.backtracking > 0) { Memoize(input, 33, transition_StartIndex); }
                }
                DebugLocation(580, 1);
            }
            finally { DebugExitRule(GrammarFileName, "transition"); }
            return retval;

        }
        // $ANTLR end "transition"

        public class select_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_select();
        partial void Leave_select();

        // $ANTLR start "select"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:582:1: select : 'select' ':' ( paralDef ( ';' paralDef )* ) -> ^( SELECT_NODE ( paralDef )+ ) ;
        [GrammarRule("select")]
        private PNTreeParser.select_return select()
        {
            Enter_select();
            EnterRule("select", 34);
            TraceIn("select", 34);
            PNTreeParser.select_return retval = new PNTreeParser.select_return();
            retval.Start = (IToken)input.LT(1);
            int select_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal261 = null;
            IToken char_literal262 = null;
            IToken char_literal264 = null;
            PNTreeParser.paralDef_return paralDef263 = default(PNTreeParser.paralDef_return);
            PNTreeParser.paralDef_return paralDef265 = default(PNTreeParser.paralDef_return);

            CommonTree string_literal261_tree = null;
            CommonTree char_literal262_tree = null;
            CommonTree char_literal264_tree = null;
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_138 = new RewriteRuleITokenStream(adaptor, "token 138");
            RewriteRuleITokenStream stream_129 = new RewriteRuleITokenStream(adaptor, "token 129");
            RewriteRuleSubtreeStream stream_paralDef = new RewriteRuleSubtreeStream(adaptor, "rule paralDef");
            try
            {
                DebugEnterRule(GrammarFileName, "select");
                DebugLocation(582, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 34)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:583:2: ( 'select' ':' ( paralDef ( ';' paralDef )* ) -> ^( SELECT_NODE ( paralDef )+ ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:583:4: 'select' ':' ( paralDef ( ';' paralDef )* )
                    {
                        DebugLocation(583, 4);
                        string_literal261 = (IToken)Match(input, 138, Follow._138_in_select2886); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_138.Add(string_literal261);

                        DebugLocation(583, 13);
                        char_literal262 = (IToken)Match(input, 129, Follow._129_in_select2888); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_129.Add(char_literal262);

                        DebugLocation(583, 17);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:583:17: ( paralDef ( ';' paralDef )* )
                        DebugEnterAlt(1);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:583:18: paralDef ( ';' paralDef )*
                        {
                            DebugLocation(583, 18);
                            PushFollow(Follow._paralDef_in_select2891);
                            paralDef263 = paralDef();
                            PopFollow();
                            if (state.failed) return retval;
                            if (state.backtracking == 0) stream_paralDef.Add(paralDef263.Tree);
                            DebugLocation(583, 27);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:583:27: ( ';' paralDef )*
                            try
                            {
                                DebugEnterSubRule(79);
                                while (true)
                                {
                                    int alt79 = 2;
                                    try
                                    {
                                        DebugEnterDecision(79, decisionCanBacktrack[79]);
                                        int LA79_0 = input.LA(1);

                                        if ((LA79_0 == 68))
                                        {
                                            alt79 = 1;
                                        }


                                    }
                                    finally { DebugExitDecision(79); }
                                    switch (alt79)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:583:28: ';' paralDef
                                            {
                                                DebugLocation(583, 28);
                                                char_literal264 = (IToken)Match(input, 68, Follow._68_in_select2894); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_68.Add(char_literal264);

                                                DebugLocation(583, 32);
                                                PushFollow(Follow._paralDef_in_select2896);
                                                paralDef265 = paralDef();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_paralDef.Add(paralDef265.Tree);

                                            }
                                            break;

                                        default:
                                            goto loop79;
                                    }
                                }

                            loop79:
                                ;

                            }
                            finally { DebugExitSubRule(79); }


                        }



                        {
                            // AST REWRITE
                            // elements: paralDef
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 583:46: -> ^( SELECT_NODE ( paralDef )+ )
                                {
                                    DebugLocation(583, 49);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:583:49: ^( SELECT_NODE ( paralDef )+ )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(583, 51);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(SELECT_NODE, "SELECT_NODE"), root_1);

                                        DebugLocation(583, 63);
                                        if (!(stream_paralDef.HasNext))
                                        {
                                            throw new RewriteEarlyExitException();
                                        }
                                        while (stream_paralDef.HasNext)
                                        {
                                            DebugLocation(583, 63);
                                            adaptor.AddChild(root_1, stream_paralDef.NextTree());

                                        }
                                        stream_paralDef.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("select", 34);
                    LeaveRule("select", 34);
                    Leave_select();
                    if (state.backtracking > 0) { Memoize(input, 34, select_StartIndex); }
                }
                DebugLocation(584, 1);
            }
            finally { DebugExitRule(GrammarFileName, "select"); }
            return retval;

        }
        // $ANTLR end "select"

        public class eventT_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_eventT();
        partial void Leave_eventT();

        // $ANTLR start "eventT"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:586:1: eventT : (name= ID '!' -> ^( CHANNEL_OUT_NODE $name) | name= ID '?' -> ^( CHANNEL_IN_NODE $name) | name= ID '[' conditionalOrExpression ']' '!' -> ^( CHANNEL_OUT_NODE $name conditionalOrExpression ) | name= ID '[' conditionalOrExpression ']' '?' -> ^( CHANNEL_IN_NODE $name conditionalOrExpression ) | eventM );
        [GrammarRule("eventT")]
        private PNTreeParser.eventT_return eventT()
        {
            Enter_eventT();
            EnterRule("eventT", 35);
            TraceIn("eventT", 35);
            PNTreeParser.eventT_return retval = new PNTreeParser.eventT_return();
            retval.Start = (IToken)input.LT(1);
            int eventT_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken name = null;
            IToken char_literal266 = null;
            IToken char_literal267 = null;
            IToken char_literal268 = null;
            IToken char_literal270 = null;
            IToken char_literal271 = null;
            IToken char_literal272 = null;
            IToken char_literal274 = null;
            IToken char_literal275 = null;
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression269 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression273 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.eventM_return eventM276 = default(PNTreeParser.eventM_return);

            CommonTree name_tree = null;
            CommonTree char_literal266_tree = null;
            CommonTree char_literal267_tree = null;
            CommonTree char_literal268_tree = null;
            CommonTree char_literal270_tree = null;
            CommonTree char_literal271_tree = null;
            CommonTree char_literal272_tree = null;
            CommonTree char_literal274_tree = null;
            CommonTree char_literal275_tree = null;
            RewriteRuleITokenStream stream_77 = new RewriteRuleITokenStream(adaptor, "token 77");
            RewriteRuleITokenStream stream_109 = new RewriteRuleITokenStream(adaptor, "token 109");
            RewriteRuleITokenStream stream_108 = new RewriteRuleITokenStream(adaptor, "token 108");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_76 = new RewriteRuleITokenStream(adaptor, "token 76");
            RewriteRuleSubtreeStream stream_conditionalOrExpression = new RewriteRuleSubtreeStream(adaptor, "rule conditionalOrExpression");
            try
            {
                DebugEnterRule(GrammarFileName, "eventT");
                DebugLocation(586, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 35)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:587:2: (name= ID '!' -> ^( CHANNEL_OUT_NODE $name) | name= ID '?' -> ^( CHANNEL_IN_NODE $name) | name= ID '[' conditionalOrExpression ']' '!' -> ^( CHANNEL_OUT_NODE $name conditionalOrExpression ) | name= ID '[' conditionalOrExpression ']' '?' -> ^( CHANNEL_IN_NODE $name conditionalOrExpression ) | eventM )
                    int alt80 = 5;
                    try
                    {
                        DebugEnterDecision(80, decisionCanBacktrack[80]);
                        int LA80_0 = input.LA(1);

                        if ((LA80_0 == ID))
                        {
                            int LA80_1 = input.LA(2);

                            if ((EvaluatePredicate(synpred132_PNTree_fragment)))
                            {
                                alt80 = 1;
                            }
                            else if ((EvaluatePredicate(synpred133_PNTree_fragment)))
                            {
                                alt80 = 2;
                            }
                            else if ((EvaluatePredicate(synpred134_PNTree_fragment)))
                            {
                                alt80 = 3;
                            }
                            else if ((EvaluatePredicate(synpred135_PNTree_fragment)))
                            {
                                alt80 = 4;
                            }
                            else if ((true))
                            {
                                alt80 = 5;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                NoViableAltException nvae = new NoViableAltException("", 80, 1, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        else if ((LA80_0 == 80))
                        {
                            alt80 = 5;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 80, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(80); }
                    switch (alt80)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:587:4: name= ID '!'
                            {
                                DebugLocation(587, 8);
                                name = (IToken)Match(input, ID, Follow._ID_in_eventT2929); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(name);

                                DebugLocation(587, 12);
                                char_literal266 = (IToken)Match(input, 76, Follow._76_in_eventT2931); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_76.Add(char_literal266);



                                {
                                    // AST REWRITE
                                    // elements: name
                                    // token labels: name
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_name = new RewriteRuleITokenStream(adaptor, "token name", name);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 587:16: -> ^( CHANNEL_OUT_NODE $name)
                                        {
                                            DebugLocation(587, 19);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:587:19: ^( CHANNEL_OUT_NODE $name)
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(587, 21);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CHANNEL_OUT_NODE, "CHANNEL_OUT_NODE"), root_1);

                                                DebugLocation(587, 38);
                                                adaptor.AddChild(root_1, stream_name.NextNode());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:588:4: name= ID '?'
                            {
                                DebugLocation(588, 8);
                                name = (IToken)Match(input, ID, Follow._ID_in_eventT2947); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(name);

                                DebugLocation(588, 12);
                                char_literal267 = (IToken)Match(input, 77, Follow._77_in_eventT2949); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_77.Add(char_literal267);



                                {
                                    // AST REWRITE
                                    // elements: name
                                    // token labels: name
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_name = new RewriteRuleITokenStream(adaptor, "token name", name);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 588:16: -> ^( CHANNEL_IN_NODE $name)
                                        {
                                            DebugLocation(588, 19);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:588:19: ^( CHANNEL_IN_NODE $name)
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(588, 21);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CHANNEL_IN_NODE, "CHANNEL_IN_NODE"), root_1);

                                                DebugLocation(588, 37);
                                                adaptor.AddChild(root_1, stream_name.NextNode());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:589:4: name= ID '[' conditionalOrExpression ']' '!'
                            {
                                DebugLocation(589, 8);
                                name = (IToken)Match(input, ID, Follow._ID_in_eventT2966); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(name);

                                DebugLocation(589, 12);
                                char_literal268 = (IToken)Match(input, 108, Follow._108_in_eventT2968); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_108.Add(char_literal268);

                                DebugLocation(589, 16);
                                PushFollow(Follow._conditionalOrExpression_in_eventT2970);
                                conditionalOrExpression269 = conditionalOrExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression269.Tree);
                                DebugLocation(589, 40);
                                char_literal270 = (IToken)Match(input, 109, Follow._109_in_eventT2972); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_109.Add(char_literal270);

                                DebugLocation(589, 44);
                                char_literal271 = (IToken)Match(input, 76, Follow._76_in_eventT2974); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_76.Add(char_literal271);



                                {
                                    // AST REWRITE
                                    // elements: conditionalOrExpression, name
                                    // token labels: name
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_name = new RewriteRuleITokenStream(adaptor, "token name", name);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 589:48: -> ^( CHANNEL_OUT_NODE $name conditionalOrExpression )
                                        {
                                            DebugLocation(589, 51);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:589:51: ^( CHANNEL_OUT_NODE $name conditionalOrExpression )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(589, 53);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CHANNEL_OUT_NODE, "CHANNEL_OUT_NODE"), root_1);

                                                DebugLocation(589, 70);
                                                adaptor.AddChild(root_1, stream_name.NextNode());
                                                DebugLocation(589, 76);
                                                adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 4:
                            DebugEnterAlt(4);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:590:4: name= ID '[' conditionalOrExpression ']' '?'
                            {
                                DebugLocation(590, 8);
                                name = (IToken)Match(input, ID, Follow._ID_in_eventT2992); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(name);

                                DebugLocation(590, 12);
                                char_literal272 = (IToken)Match(input, 108, Follow._108_in_eventT2994); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_108.Add(char_literal272);

                                DebugLocation(590, 16);
                                PushFollow(Follow._conditionalOrExpression_in_eventT2996);
                                conditionalOrExpression273 = conditionalOrExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression273.Tree);
                                DebugLocation(590, 40);
                                char_literal274 = (IToken)Match(input, 109, Follow._109_in_eventT2998); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_109.Add(char_literal274);

                                DebugLocation(590, 44);
                                char_literal275 = (IToken)Match(input, 77, Follow._77_in_eventT3000); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_77.Add(char_literal275);



                                {
                                    // AST REWRITE
                                    // elements: conditionalOrExpression, name
                                    // token labels: name
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_name = new RewriteRuleITokenStream(adaptor, "token name", name);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 590:48: -> ^( CHANNEL_IN_NODE $name conditionalOrExpression )
                                        {
                                            DebugLocation(590, 51);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:590:51: ^( CHANNEL_IN_NODE $name conditionalOrExpression )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(590, 53);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CHANNEL_IN_NODE, "CHANNEL_IN_NODE"), root_1);

                                                DebugLocation(590, 69);
                                                adaptor.AddChild(root_1, stream_name.NextNode());
                                                DebugLocation(590, 75);
                                                adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 5:
                            DebugEnterAlt(5);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:591:4: eventM
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(591, 4);
                                PushFollow(Follow._eventM_in_eventT3017);
                                eventM276 = eventM();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, eventM276.Tree);

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("eventT", 35);
                    LeaveRule("eventT", 35);
                    Leave_eventT();
                    if (state.backtracking > 0) { Memoize(input, 35, eventT_StartIndex); }
                }
                DebugLocation(592, 1);
            }
            finally { DebugExitRule(GrammarFileName, "eventT"); }
            return retval;

        }
        // $ANTLR end "eventT"

        public class interleaveExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_interleaveExpr();
        partial void Leave_interleaveExpr();

        // $ANTLR start "interleaveExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:595:1: interleaveExpr : (p= parallelExpr ( ( '|||' parallelExpr )+ -> ^( '|||' ( parallelExpr )+ ) | -> $p) | '|||' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( INTERLEAVE_NODE ( paralDef )+ interleaveExpr ) | '|||' paralDef2 '@' interleaveExpr -> ^( INTERLEAVE_NODE paralDef2 interleaveExpr ) );
        [GrammarRule("interleaveExpr")]
        private PNTreeParser.interleaveExpr_return interleaveExpr()
        {
            Enter_interleaveExpr();
            EnterRule("interleaveExpr", 36);
            TraceIn("interleaveExpr", 36);
            PNTreeParser.interleaveExpr_return retval = new PNTreeParser.interleaveExpr_return();
            retval.Start = (IToken)input.LT(1);
            int interleaveExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal277 = null;
            IToken string_literal279 = null;
            IToken char_literal281 = null;
            IToken char_literal283 = null;
            IToken string_literal285 = null;
            IToken char_literal287 = null;
            PNTreeParser.parallelExpr_return p = default(PNTreeParser.parallelExpr_return);
            PNTreeParser.parallelExpr_return parallelExpr278 = default(PNTreeParser.parallelExpr_return);
            PNTreeParser.paralDef_return paralDef280 = default(PNTreeParser.paralDef_return);
            PNTreeParser.paralDef_return paralDef282 = default(PNTreeParser.paralDef_return);
            PNTreeParser.interleaveExpr_return interleaveExpr284 = default(PNTreeParser.interleaveExpr_return);
            PNTreeParser.paralDef2_return paralDef2286 = default(PNTreeParser.paralDef2_return);
            PNTreeParser.interleaveExpr_return interleaveExpr288 = default(PNTreeParser.interleaveExpr_return);

            CommonTree string_literal277_tree = null;
            CommonTree string_literal279_tree = null;
            CommonTree char_literal281_tree = null;
            CommonTree char_literal283_tree = null;
            CommonTree string_literal285_tree = null;
            CommonTree char_literal287_tree = null;
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_139 = new RewriteRuleITokenStream(adaptor, "token 139");
            RewriteRuleITokenStream stream_140 = new RewriteRuleITokenStream(adaptor, "token 140");
            RewriteRuleSubtreeStream stream_parallelExpr = new RewriteRuleSubtreeStream(adaptor, "rule parallelExpr");
            RewriteRuleSubtreeStream stream_paralDef = new RewriteRuleSubtreeStream(adaptor, "rule paralDef");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            RewriteRuleSubtreeStream stream_paralDef2 = new RewriteRuleSubtreeStream(adaptor, "rule paralDef2");
            paraphrases.Push("in interleave process");
            try
            {
                DebugEnterRule(GrammarFileName, "interleaveExpr");
                DebugLocation(595, 5);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 36)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:598:2: (p= parallelExpr ( ( '|||' parallelExpr )+ -> ^( '|||' ( parallelExpr )+ ) | -> $p) | '|||' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( INTERLEAVE_NODE ( paralDef )+ interleaveExpr ) | '|||' paralDef2 '@' interleaveExpr -> ^( INTERLEAVE_NODE paralDef2 interleaveExpr ) )
                    int alt84 = 3;
                    try
                    {
                        DebugEnterDecision(84, decisionCanBacktrack[84]);
                        int LA84_0 = input.LA(1);

                        if ((LA84_0 == ID || LA84_0 == 70 || LA84_0 == 72 || (LA84_0 >= 74 && LA84_0 <= 75) || (LA84_0 >= 79 && LA84_0 <= 80) || LA84_0 == 99 || LA84_0 == 108 || LA84_0 == 131 || LA84_0 == 141 || LA84_0 == 144 || (LA84_0 >= 146 && LA84_0 <= 150)))
                        {
                            alt84 = 1;
                        }
                        else if ((LA84_0 == 139))
                        {
                            int LA84_2 = input.LA(2);

                            if ((LA84_2 == ID))
                            {
                                alt84 = 2;
                            }
                            else if ((LA84_2 == 99))
                            {
                                alt84 = 3;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                NoViableAltException nvae = new NoViableAltException("", 84, 2, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 84, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(84); }
                    switch (alt84)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:598:4: p= parallelExpr ( ( '|||' parallelExpr )+ -> ^( '|||' ( parallelExpr )+ ) | -> $p)
                            {
                                DebugLocation(598, 5);
                                PushFollow(Follow._parallelExpr_in_interleaveExpr3045);
                                p = parallelExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_parallelExpr.Add(p.Tree);
                                DebugLocation(599, 4);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:599:4: ( ( '|||' parallelExpr )+ -> ^( '|||' ( parallelExpr )+ ) | -> $p)
                                int alt82 = 2;
                                try
                                {
                                    DebugEnterSubRule(82);
                                    try
                                    {
                                        DebugEnterDecision(82, decisionCanBacktrack[82]);
                                        int LA82_0 = input.LA(1);

                                        if ((LA82_0 == 139))
                                        {
                                            int LA82_1 = input.LA(2);

                                            if ((EvaluatePredicate(synpred137_PNTree_fragment)))
                                            {
                                                alt82 = 1;
                                            }
                                            else if ((true))
                                            {
                                                alt82 = 2;
                                            }
                                            else
                                            {
                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                NoViableAltException nvae = new NoViableAltException("", 82, 1, input);

                                                DebugRecognitionException(nvae);
                                                throw nvae;
                                            }
                                        }
                                        else if ((LA82_0 == EOF || (LA82_0 >= ID && LA82_0 <= INT) || LA82_0 == 68 || (LA82_0 >= 72 && LA82_0 <= 76) || LA82_0 == 79 || LA82_0 == 100 || (LA82_0 >= 102 && LA82_0 <= 104) || LA82_0 == 120 || (LA82_0 >= 126 && LA82_0 <= 127) || LA82_0 == 145))
                                        {
                                            alt82 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 82, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(82); }
                                    switch (alt82)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:5: ( '|||' parallelExpr )+
                                            {
                                                DebugLocation(600, 5);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:5: ( '|||' parallelExpr )+
                                                int cnt81 = 0;
                                                try
                                                {
                                                    DebugEnterSubRule(81);
                                                    while (true)
                                                    {
                                                        int alt81 = 2;
                                                        try
                                                        {
                                                            DebugEnterDecision(81, decisionCanBacktrack[81]);
                                                            int LA81_0 = input.LA(1);

                                                            if ((LA81_0 == 139))
                                                            {
                                                                int LA81_2 = input.LA(2);

                                                                if ((EvaluatePredicate(synpred136_PNTree_fragment)))
                                                                {
                                                                    alt81 = 1;
                                                                }


                                                            }


                                                        }
                                                        finally { DebugExitDecision(81); }
                                                        switch (alt81)
                                                        {
                                                            case 1:
                                                                DebugEnterAlt(1);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:6: '|||' parallelExpr
                                                                {
                                                                    DebugLocation(600, 6);
                                                                    string_literal277 = (IToken)Match(input, 139, Follow._139_in_interleaveExpr3057); if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_139.Add(string_literal277);

                                                                    DebugLocation(600, 12);
                                                                    PushFollow(Follow._parallelExpr_in_interleaveExpr3059);
                                                                    parallelExpr278 = parallelExpr();
                                                                    PopFollow();
                                                                    if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_parallelExpr.Add(parallelExpr278.Tree);

                                                                }
                                                                break;

                                                            default:
                                                                if (cnt81 >= 1)
                                                                    goto loop81;

                                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                                EarlyExitException eee81 = new EarlyExitException(81, input);
                                                                DebugRecognitionException(eee81);
                                                                throw eee81;
                                                        }
                                                        cnt81++;
                                                    }
                                                loop81:
                                                    ;

                                                }
                                                finally { DebugExitSubRule(81); }



                                                {
                                                    // AST REWRITE
                                                    // elements: parallelExpr, 139
                                                    // token labels: 
                                                    // rule labels: retval
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 600:28: -> ^( '|||' ( parallelExpr )+ )
                                                        {
                                                            DebugLocation(600, 31);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:31: ^( '|||' ( parallelExpr )+ )
                                                            {
                                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                                DebugLocation(600, 33);
                                                                root_1 = (CommonTree)adaptor.BecomeRoot(stream_139.NextNode(), root_1);

                                                                DebugLocation(600, 39);
                                                                if (!(stream_parallelExpr.HasNext))
                                                                {
                                                                    throw new RewriteEarlyExitException();
                                                                }
                                                                while (stream_parallelExpr.HasNext)
                                                                {
                                                                    DebugLocation(600, 39);
                                                                    adaptor.AddChild(root_1, stream_parallelExpr.NextTree());

                                                                }
                                                                stream_parallelExpr.Reset();

                                                                adaptor.AddChild(root_0, root_1);
                                                            }

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:601:7: 
                                            {

                                                {
                                                    // AST REWRITE
                                                    // elements: p
                                                    // token labels: 
                                                    // rule labels: retval, p
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                                        RewriteRuleSubtreeStream stream_p = new RewriteRuleSubtreeStream(adaptor, "rule p", p != null ? p.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 601:7: -> $p
                                                        {
                                                            DebugLocation(601, 10);
                                                            adaptor.AddChild(root_0, stream_p.NextTree());

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(82); }


                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:604:4: '|||' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr
                            {
                                DebugLocation(604, 4);
                                string_literal279 = (IToken)Match(input, 139, Follow._139_in_interleaveExpr3097); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_139.Add(string_literal279);

                                DebugLocation(604, 10);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:604:10: ( paralDef ( ';' paralDef )* )
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:604:11: paralDef ( ';' paralDef )*
                                {
                                    DebugLocation(604, 11);
                                    PushFollow(Follow._paralDef_in_interleaveExpr3100);
                                    paralDef280 = paralDef();
                                    PopFollow();
                                    if (state.failed) return retval;
                                    if (state.backtracking == 0) stream_paralDef.Add(paralDef280.Tree);
                                    DebugLocation(604, 20);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:604:20: ( ';' paralDef )*
                                    try
                                    {
                                        DebugEnterSubRule(83);
                                        while (true)
                                        {
                                            int alt83 = 2;
                                            try
                                            {
                                                DebugEnterDecision(83, decisionCanBacktrack[83]);
                                                int LA83_0 = input.LA(1);

                                                if ((LA83_0 == 68))
                                                {
                                                    alt83 = 1;
                                                }


                                            }
                                            finally { DebugExitDecision(83); }
                                            switch (alt83)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:604:21: ';' paralDef
                                                    {
                                                        DebugLocation(604, 21);
                                                        char_literal281 = (IToken)Match(input, 68, Follow._68_in_interleaveExpr3103); if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_68.Add(char_literal281);

                                                        DebugLocation(604, 25);
                                                        PushFollow(Follow._paralDef_in_interleaveExpr3105);
                                                        paralDef282 = paralDef();
                                                        PopFollow();
                                                        if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_paralDef.Add(paralDef282.Tree);

                                                    }
                                                    break;

                                                default:
                                                    goto loop83;
                                            }
                                        }

                                    loop83:
                                        ;

                                    }
                                    finally { DebugExitSubRule(83); }


                                }

                                DebugLocation(604, 38);
                                char_literal283 = (IToken)Match(input, 140, Follow._140_in_interleaveExpr3111); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_140.Add(char_literal283);

                                DebugLocation(604, 42);
                                PushFollow(Follow._interleaveExpr_in_interleaveExpr3113);
                                interleaveExpr284 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr284.Tree);


                                {
                                    // AST REWRITE
                                    // elements: paralDef, interleaveExpr
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 604:57: -> ^( INTERLEAVE_NODE ( paralDef )+ interleaveExpr )
                                        {
                                            DebugLocation(604, 60);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:604:60: ^( INTERLEAVE_NODE ( paralDef )+ interleaveExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(604, 62);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(INTERLEAVE_NODE, "INTERLEAVE_NODE"), root_1);

                                                DebugLocation(604, 78);
                                                if (!(stream_paralDef.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_paralDef.HasNext)
                                                {
                                                    DebugLocation(604, 78);
                                                    adaptor.AddChild(root_1, stream_paralDef.NextTree());

                                                }
                                                stream_paralDef.Reset();
                                                DebugLocation(604, 88);
                                                adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:605:4: '|||' paralDef2 '@' interleaveExpr
                            {
                                DebugLocation(605, 4);
                                string_literal285 = (IToken)Match(input, 139, Follow._139_in_interleaveExpr3129); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_139.Add(string_literal285);

                                DebugLocation(605, 10);
                                PushFollow(Follow._paralDef2_in_interleaveExpr3131);
                                paralDef2286 = paralDef2();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_paralDef2.Add(paralDef2286.Tree);
                                DebugLocation(605, 20);
                                char_literal287 = (IToken)Match(input, 140, Follow._140_in_interleaveExpr3133); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_140.Add(char_literal287);

                                DebugLocation(605, 24);
                                PushFollow(Follow._interleaveExpr_in_interleaveExpr3135);
                                interleaveExpr288 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr288.Tree);


                                {
                                    // AST REWRITE
                                    // elements: interleaveExpr, paralDef2
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 605:39: -> ^( INTERLEAVE_NODE paralDef2 interleaveExpr )
                                        {
                                            DebugLocation(605, 42);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:605:42: ^( INTERLEAVE_NODE paralDef2 interleaveExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(605, 44);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(INTERLEAVE_NODE, "INTERLEAVE_NODE"), root_1);

                                                DebugLocation(605, 60);
                                                adaptor.AddChild(root_1, stream_paralDef2.NextTree());
                                                DebugLocation(605, 70);
                                                adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("interleaveExpr", 36);
                    LeaveRule("interleaveExpr", 36);
                    Leave_interleaveExpr();
                    if (state.backtracking > 0) { Memoize(input, 36, interleaveExpr_StartIndex); }
                }
                DebugLocation(607, 5);
            }
            finally { DebugExitRule(GrammarFileName, "interleaveExpr"); }
            return retval;

        }
        // $ANTLR end "interleaveExpr"

        public class parallelExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_parallelExpr();
        partial void Leave_parallelExpr();

        // $ANTLR start "parallelExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:609:1: parallelExpr : (p= generalChoiceExpr ( ( '||' generalChoiceExpr )+ -> ^( '||' ( generalChoiceExpr )+ ) | -> $p) | '||' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( PARALLEL_NODE ( paralDef )+ interleaveExpr ) );
        [GrammarRule("parallelExpr")]
        private PNTreeParser.parallelExpr_return parallelExpr()
        {
            Enter_parallelExpr();
            EnterRule("parallelExpr", 37);
            TraceIn("parallelExpr", 37);
            PNTreeParser.parallelExpr_return retval = new PNTreeParser.parallelExpr_return();
            retval.Start = (IToken)input.LT(1);
            int parallelExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal289 = null;
            IToken string_literal291 = null;
            IToken char_literal293 = null;
            IToken char_literal295 = null;
            PNTreeParser.generalChoiceExpr_return p = default(PNTreeParser.generalChoiceExpr_return);
            PNTreeParser.generalChoiceExpr_return generalChoiceExpr290 = default(PNTreeParser.generalChoiceExpr_return);
            PNTreeParser.paralDef_return paralDef292 = default(PNTreeParser.paralDef_return);
            PNTreeParser.paralDef_return paralDef294 = default(PNTreeParser.paralDef_return);
            PNTreeParser.interleaveExpr_return interleaveExpr296 = default(PNTreeParser.interleaveExpr_return);

            CommonTree string_literal289_tree = null;
            CommonTree string_literal291_tree = null;
            CommonTree char_literal293_tree = null;
            CommonTree char_literal295_tree = null;
            RewriteRuleITokenStream stream_79 = new RewriteRuleITokenStream(adaptor, "token 79");
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_140 = new RewriteRuleITokenStream(adaptor, "token 140");
            RewriteRuleSubtreeStream stream_generalChoiceExpr = new RewriteRuleSubtreeStream(adaptor, "rule generalChoiceExpr");
            RewriteRuleSubtreeStream stream_paralDef = new RewriteRuleSubtreeStream(adaptor, "rule paralDef");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            paraphrases.Push("in parallel process");
            try
            {
                DebugEnterRule(GrammarFileName, "parallelExpr");
                DebugLocation(609, 5);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 37)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:612:2: (p= generalChoiceExpr ( ( '||' generalChoiceExpr )+ -> ^( '||' ( generalChoiceExpr )+ ) | -> $p) | '||' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( PARALLEL_NODE ( paralDef )+ interleaveExpr ) )
                    int alt88 = 2;
                    try
                    {
                        DebugEnterDecision(88, decisionCanBacktrack[88]);
                        int LA88_0 = input.LA(1);

                        if ((LA88_0 == ID || LA88_0 == 70 || LA88_0 == 72 || (LA88_0 >= 74 && LA88_0 <= 75) || LA88_0 == 80 || LA88_0 == 99 || LA88_0 == 108 || LA88_0 == 131 || LA88_0 == 141 || LA88_0 == 144 || (LA88_0 >= 146 && LA88_0 <= 150)))
                        {
                            alt88 = 1;
                        }
                        else if ((LA88_0 == 79))
                        {
                            alt88 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 88, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(88); }
                    switch (alt88)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:612:4: p= generalChoiceExpr ( ( '||' generalChoiceExpr )+ -> ^( '||' ( generalChoiceExpr )+ ) | -> $p)
                            {
                                DebugLocation(612, 5);
                                PushFollow(Follow._generalChoiceExpr_in_parallelExpr3181);
                                p = generalChoiceExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_generalChoiceExpr.Add(p.Tree);
                                DebugLocation(613, 2);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:613:2: ( ( '||' generalChoiceExpr )+ -> ^( '||' ( generalChoiceExpr )+ ) | -> $p)
                                int alt86 = 2;
                                try
                                {
                                    DebugEnterSubRule(86);
                                    try
                                    {
                                        DebugEnterDecision(86, decisionCanBacktrack[86]);
                                        int LA86_0 = input.LA(1);

                                        if ((LA86_0 == 79))
                                        {
                                            int LA86_1 = input.LA(2);

                                            if ((EvaluatePredicate(synpred142_PNTree_fragment)))
                                            {
                                                alt86 = 1;
                                            }
                                            else if ((true))
                                            {
                                                alt86 = 2;
                                            }
                                            else
                                            {
                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                NoViableAltException nvae = new NoViableAltException("", 86, 1, input);

                                                DebugRecognitionException(nvae);
                                                throw nvae;
                                            }
                                        }
                                        else if ((LA86_0 == EOF || (LA86_0 >= ID && LA86_0 <= INT) || LA86_0 == 68 || (LA86_0 >= 72 && LA86_0 <= 76) || LA86_0 == 100 || (LA86_0 >= 102 && LA86_0 <= 104) || LA86_0 == 120 || (LA86_0 >= 126 && LA86_0 <= 127) || LA86_0 == 139 || LA86_0 == 145))
                                        {
                                            alt86 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 86, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(86); }
                                    switch (alt86)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:3: ( '||' generalChoiceExpr )+
                                            {
                                                DebugLocation(614, 3);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:3: ( '||' generalChoiceExpr )+
                                                int cnt85 = 0;
                                                try
                                                {
                                                    DebugEnterSubRule(85);
                                                    while (true)
                                                    {
                                                        int alt85 = 2;
                                                        try
                                                        {
                                                            DebugEnterDecision(85, decisionCanBacktrack[85]);
                                                            int LA85_0 = input.LA(1);

                                                            if ((LA85_0 == 79))
                                                            {
                                                                int LA85_2 = input.LA(2);

                                                                if ((EvaluatePredicate(synpred141_PNTree_fragment)))
                                                                {
                                                                    alt85 = 1;
                                                                }


                                                            }


                                                        }
                                                        finally { DebugExitDecision(85); }
                                                        switch (alt85)
                                                        {
                                                            case 1:
                                                                DebugEnterAlt(1);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:4: '||' generalChoiceExpr
                                                                {
                                                                    DebugLocation(614, 4);
                                                                    string_literal289 = (IToken)Match(input, 79, Follow._79_in_parallelExpr3190); if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_79.Add(string_literal289);

                                                                    DebugLocation(614, 9);
                                                                    PushFollow(Follow._generalChoiceExpr_in_parallelExpr3192);
                                                                    generalChoiceExpr290 = generalChoiceExpr();
                                                                    PopFollow();
                                                                    if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_generalChoiceExpr.Add(generalChoiceExpr290.Tree);

                                                                }
                                                                break;

                                                            default:
                                                                if (cnt85 >= 1)
                                                                    goto loop85;

                                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                                EarlyExitException eee85 = new EarlyExitException(85, input);
                                                                DebugRecognitionException(eee85);
                                                                throw eee85;
                                                        }
                                                        cnt85++;
                                                    }
                                                loop85:
                                                    ;

                                                }
                                                finally { DebugExitSubRule(85); }



                                                {
                                                    // AST REWRITE
                                                    // elements: 79, generalChoiceExpr
                                                    // token labels: 
                                                    // rule labels: retval
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 614:30: -> ^( '||' ( generalChoiceExpr )+ )
                                                        {
                                                            DebugLocation(614, 33);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:33: ^( '||' ( generalChoiceExpr )+ )
                                                            {
                                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                                DebugLocation(614, 35);
                                                                root_1 = (CommonTree)adaptor.BecomeRoot(stream_79.NextNode(), root_1);

                                                                DebugLocation(614, 40);
                                                                if (!(stream_generalChoiceExpr.HasNext))
                                                                {
                                                                    throw new RewriteEarlyExitException();
                                                                }
                                                                while (stream_generalChoiceExpr.HasNext)
                                                                {
                                                                    DebugLocation(614, 40);
                                                                    adaptor.AddChild(root_1, stream_generalChoiceExpr.NextTree());

                                                                }
                                                                stream_generalChoiceExpr.Reset();

                                                                adaptor.AddChild(root_0, root_1);
                                                            }

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:615:5: 
                                            {

                                                {
                                                    // AST REWRITE
                                                    // elements: p
                                                    // token labels: 
                                                    // rule labels: retval, p
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                                        RewriteRuleSubtreeStream stream_p = new RewriteRuleSubtreeStream(adaptor, "rule p", p != null ? p.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 615:5: -> $p
                                                        {
                                                            DebugLocation(615, 8);
                                                            adaptor.AddChild(root_0, stream_p.NextTree());

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(86); }


                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:617:4: '||' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr
                            {
                                DebugLocation(617, 4);
                                string_literal291 = (IToken)Match(input, 79, Follow._79_in_parallelExpr3221); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_79.Add(string_literal291);

                                DebugLocation(617, 9);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:617:9: ( paralDef ( ';' paralDef )* )
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:617:10: paralDef ( ';' paralDef )*
                                {
                                    DebugLocation(617, 10);
                                    PushFollow(Follow._paralDef_in_parallelExpr3224);
                                    paralDef292 = paralDef();
                                    PopFollow();
                                    if (state.failed) return retval;
                                    if (state.backtracking == 0) stream_paralDef.Add(paralDef292.Tree);
                                    DebugLocation(617, 19);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:617:19: ( ';' paralDef )*
                                    try
                                    {
                                        DebugEnterSubRule(87);
                                        while (true)
                                        {
                                            int alt87 = 2;
                                            try
                                            {
                                                DebugEnterDecision(87, decisionCanBacktrack[87]);
                                                int LA87_0 = input.LA(1);

                                                if ((LA87_0 == 68))
                                                {
                                                    alt87 = 1;
                                                }


                                            }
                                            finally { DebugExitDecision(87); }
                                            switch (alt87)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:617:20: ';' paralDef
                                                    {
                                                        DebugLocation(617, 20);
                                                        char_literal293 = (IToken)Match(input, 68, Follow._68_in_parallelExpr3227); if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_68.Add(char_literal293);

                                                        DebugLocation(617, 24);
                                                        PushFollow(Follow._paralDef_in_parallelExpr3229);
                                                        paralDef294 = paralDef();
                                                        PopFollow();
                                                        if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_paralDef.Add(paralDef294.Tree);

                                                    }
                                                    break;

                                                default:
                                                    goto loop87;
                                            }
                                        }

                                    loop87:
                                        ;

                                    }
                                    finally { DebugExitSubRule(87); }


                                }

                                DebugLocation(617, 37);
                                char_literal295 = (IToken)Match(input, 140, Follow._140_in_parallelExpr3235); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_140.Add(char_literal295);

                                DebugLocation(617, 41);
                                PushFollow(Follow._interleaveExpr_in_parallelExpr3237);
                                interleaveExpr296 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr296.Tree);


                                {
                                    // AST REWRITE
                                    // elements: interleaveExpr, paralDef
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 617:56: -> ^( PARALLEL_NODE ( paralDef )+ interleaveExpr )
                                        {
                                            DebugLocation(617, 59);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:617:59: ^( PARALLEL_NODE ( paralDef )+ interleaveExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(617, 61);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(PARALLEL_NODE, "PARALLEL_NODE"), root_1);

                                                DebugLocation(617, 75);
                                                if (!(stream_paralDef.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_paralDef.HasNext)
                                                {
                                                    DebugLocation(617, 75);
                                                    adaptor.AddChild(root_1, stream_paralDef.NextTree());

                                                }
                                                stream_paralDef.Reset();
                                                DebugLocation(617, 85);
                                                adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("parallelExpr", 37);
                    LeaveRule("parallelExpr", 37);
                    Leave_parallelExpr();
                    if (state.backtracking > 0) { Memoize(input, 37, parallelExpr_StartIndex); }
                }
                DebugLocation(618, 5);
            }
            finally { DebugExitRule(GrammarFileName, "parallelExpr"); }
            return retval;

        }
        // $ANTLR end "parallelExpr"

        public class paralDef_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_paralDef();
        partial void Leave_paralDef();

        // $ANTLR start "paralDef"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:620:1: paralDef : ( ID ':' '{' additiveExpression ( ',' additiveExpression )* '}' -> ^( PARADEF_NODE ID ( additiveExpression )+ ) | ID ':' '{' int1= additiveExpression '..' int2= additiveExpression '}' -> ^( PARADEF1_NODE ID $int1 $int2) );
        [GrammarRule("paralDef")]
        private PNTreeParser.paralDef_return paralDef()
        {
            Enter_paralDef();
            EnterRule("paralDef", 38);
            TraceIn("paralDef", 38);
            PNTreeParser.paralDef_return retval = new PNTreeParser.paralDef_return();
            retval.Start = (IToken)input.LT(1);
            int paralDef_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken ID297 = null;
            IToken char_literal298 = null;
            IToken char_literal299 = null;
            IToken char_literal301 = null;
            IToken char_literal303 = null;
            IToken ID304 = null;
            IToken char_literal305 = null;
            IToken char_literal306 = null;
            IToken string_literal307 = null;
            IToken char_literal308 = null;
            PNTreeParser.additiveExpression_return int1 = default(PNTreeParser.additiveExpression_return);
            PNTreeParser.additiveExpression_return int2 = default(PNTreeParser.additiveExpression_return);
            PNTreeParser.additiveExpression_return additiveExpression300 = default(PNTreeParser.additiveExpression_return);
            PNTreeParser.additiveExpression_return additiveExpression302 = default(PNTreeParser.additiveExpression_return);

            CommonTree ID297_tree = null;
            CommonTree char_literal298_tree = null;
            CommonTree char_literal299_tree = null;
            CommonTree char_literal301_tree = null;
            CommonTree char_literal303_tree = null;
            CommonTree ID304_tree = null;
            CommonTree char_literal305_tree = null;
            CommonTree char_literal306_tree = null;
            CommonTree string_literal307_tree = null;
            CommonTree char_literal308_tree = null;
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_129 = new RewriteRuleITokenStream(adaptor, "token 129");
            RewriteRuleITokenStream stream_130 = new RewriteRuleITokenStream(adaptor, "token 130");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_additiveExpression = new RewriteRuleSubtreeStream(adaptor, "rule additiveExpression");
            try
            {
                DebugEnterRule(GrammarFileName, "paralDef");
                DebugLocation(620, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 38)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:621:2: ( ID ':' '{' additiveExpression ( ',' additiveExpression )* '}' -> ^( PARADEF_NODE ID ( additiveExpression )+ ) | ID ':' '{' int1= additiveExpression '..' int2= additiveExpression '}' -> ^( PARADEF1_NODE ID $int1 $int2) )
                    int alt90 = 2;
                    try
                    {
                        DebugEnterDecision(90, decisionCanBacktrack[90]);
                        int LA90_0 = input.LA(1);

                        if ((LA90_0 == ID))
                        {
                            int LA90_1 = input.LA(2);

                            if ((EvaluatePredicate(synpred146_PNTree_fragment)))
                            {
                                alt90 = 1;
                            }
                            else if ((true))
                            {
                                alt90 = 2;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                NoViableAltException nvae = new NoViableAltException("", 90, 1, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 90, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(90); }
                    switch (alt90)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:621:4: ID ':' '{' additiveExpression ( ',' additiveExpression )* '}'
                            {
                                DebugLocation(621, 4);
                                ID297 = (IToken)Match(input, ID, Follow._ID_in_paralDef3270); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID297);

                                DebugLocation(621, 7);
                                char_literal298 = (IToken)Match(input, 129, Follow._129_in_paralDef3272); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_129.Add(char_literal298);

                                DebugLocation(621, 11);
                                char_literal299 = (IToken)Match(input, 99, Follow._99_in_paralDef3274); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_99.Add(char_literal299);

                                DebugLocation(621, 15);
                                PushFollow(Follow._additiveExpression_in_paralDef3276);
                                additiveExpression300 = additiveExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_additiveExpression.Add(additiveExpression300.Tree);
                                DebugLocation(621, 34);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:621:34: ( ',' additiveExpression )*
                                try
                                {
                                    DebugEnterSubRule(89);
                                    while (true)
                                    {
                                        int alt89 = 2;
                                        try
                                        {
                                            DebugEnterDecision(89, decisionCanBacktrack[89]);
                                            int LA89_0 = input.LA(1);

                                            if ((LA89_0 == 97))
                                            {
                                                alt89 = 1;
                                            }


                                        }
                                        finally { DebugExitDecision(89); }
                                        switch (alt89)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:621:35: ',' additiveExpression
                                                {
                                                    DebugLocation(621, 35);
                                                    char_literal301 = (IToken)Match(input, 97, Follow._97_in_paralDef3279); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_97.Add(char_literal301);

                                                    DebugLocation(621, 39);
                                                    PushFollow(Follow._additiveExpression_in_paralDef3281);
                                                    additiveExpression302 = additiveExpression();
                                                    PopFollow();
                                                    if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_additiveExpression.Add(additiveExpression302.Tree);

                                                }
                                                break;

                                            default:
                                                goto loop89;
                                        }
                                    }

                                loop89:
                                    ;

                                }
                                finally { DebugExitSubRule(89); }

                                DebugLocation(621, 61);
                                char_literal303 = (IToken)Match(input, 100, Follow._100_in_paralDef3286); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_100.Add(char_literal303);



                                {
                                    // AST REWRITE
                                    // elements: additiveExpression, ID
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 621:65: -> ^( PARADEF_NODE ID ( additiveExpression )+ )
                                        {
                                            DebugLocation(621, 69);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:621:69: ^( PARADEF_NODE ID ( additiveExpression )+ )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(621, 71);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(PARADEF_NODE, "PARADEF_NODE"), root_1);

                                                DebugLocation(621, 84);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(621, 87);
                                                if (!(stream_additiveExpression.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_additiveExpression.HasNext)
                                                {
                                                    DebugLocation(621, 87);
                                                    adaptor.AddChild(root_1, stream_additiveExpression.NextTree());

                                                }
                                                stream_additiveExpression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:622:4: ID ':' '{' int1= additiveExpression '..' int2= additiveExpression '}'
                            {
                                DebugLocation(622, 4);
                                ID304 = (IToken)Match(input, ID, Follow._ID_in_paralDef3303); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID304);

                                DebugLocation(622, 7);
                                char_literal305 = (IToken)Match(input, 129, Follow._129_in_paralDef3305); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_129.Add(char_literal305);

                                DebugLocation(622, 11);
                                char_literal306 = (IToken)Match(input, 99, Follow._99_in_paralDef3307); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_99.Add(char_literal306);

                                DebugLocation(622, 19);
                                PushFollow(Follow._additiveExpression_in_paralDef3311);
                                int1 = additiveExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_additiveExpression.Add(int1.Tree);
                                DebugLocation(622, 39);
                                string_literal307 = (IToken)Match(input, 130, Follow._130_in_paralDef3313); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_130.Add(string_literal307);

                                DebugLocation(622, 48);
                                PushFollow(Follow._additiveExpression_in_paralDef3317);
                                int2 = additiveExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_additiveExpression.Add(int2.Tree);
                                DebugLocation(622, 69);
                                char_literal308 = (IToken)Match(input, 100, Follow._100_in_paralDef3320); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_100.Add(char_literal308);



                                {
                                    // AST REWRITE
                                    // elements: ID, int2, int1
                                    // token labels: 
                                    // rule labels: retval, int1, int2
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                        RewriteRuleSubtreeStream stream_int1 = new RewriteRuleSubtreeStream(adaptor, "rule int1", int1 != null ? int1.Tree : null);
                                        RewriteRuleSubtreeStream stream_int2 = new RewriteRuleSubtreeStream(adaptor, "rule int2", int2 != null ? int2.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 622:73: -> ^( PARADEF1_NODE ID $int1 $int2)
                                        {
                                            DebugLocation(622, 76);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:622:76: ^( PARADEF1_NODE ID $int1 $int2)
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(622, 78);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(PARADEF1_NODE, "PARADEF1_NODE"), root_1);

                                                DebugLocation(622, 92);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(622, 95);
                                                adaptor.AddChild(root_1, stream_int1.NextTree());
                                                DebugLocation(622, 101);
                                                adaptor.AddChild(root_1, stream_int2.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("paralDef", 38);
                    LeaveRule("paralDef", 38);
                    Leave_paralDef();
                    if (state.backtracking > 0) { Memoize(input, 38, paralDef_StartIndex); }
                }
                DebugLocation(623, 1);
            }
            finally { DebugExitRule(GrammarFileName, "paralDef"); }
            return retval;

        }
        // $ANTLR end "paralDef"

        public class paralDef2_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_paralDef2();
        partial void Leave_paralDef2();

        // $ANTLR start "paralDef2"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:625:1: paralDef2 : ( '{' '..' '}' -> ^( PARADEF2_NODE ) | '{' int1= additiveExpression '}' -> ^( PARADEF2_NODE $int1) );
        [GrammarRule("paralDef2")]
        private PNTreeParser.paralDef2_return paralDef2()
        {
            Enter_paralDef2();
            EnterRule("paralDef2", 39);
            TraceIn("paralDef2", 39);
            PNTreeParser.paralDef2_return retval = new PNTreeParser.paralDef2_return();
            retval.Start = (IToken)input.LT(1);
            int paralDef2_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal309 = null;
            IToken string_literal310 = null;
            IToken char_literal311 = null;
            IToken char_literal312 = null;
            IToken char_literal313 = null;
            PNTreeParser.additiveExpression_return int1 = default(PNTreeParser.additiveExpression_return);

            CommonTree char_literal309_tree = null;
            CommonTree string_literal310_tree = null;
            CommonTree char_literal311_tree = null;
            CommonTree char_literal312_tree = null;
            CommonTree char_literal313_tree = null;
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_130 = new RewriteRuleITokenStream(adaptor, "token 130");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_additiveExpression = new RewriteRuleSubtreeStream(adaptor, "rule additiveExpression");
            try
            {
                DebugEnterRule(GrammarFileName, "paralDef2");
                DebugLocation(625, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 39)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:626:2: ( '{' '..' '}' -> ^( PARADEF2_NODE ) | '{' int1= additiveExpression '}' -> ^( PARADEF2_NODE $int1) )
                    int alt91 = 2;
                    try
                    {
                        DebugEnterDecision(91, decisionCanBacktrack[91]);
                        int LA91_0 = input.LA(1);

                        if ((LA91_0 == 99))
                        {
                            int LA91_1 = input.LA(2);

                            if ((LA91_1 == 130))
                            {
                                alt91 = 1;
                            }
                            else if (((LA91_1 >= ID && LA91_1 <= INT) || LA91_1 == 72 || LA91_1 == 76 || (LA91_1 >= 102 && LA91_1 <= 104) || LA91_1 == 120 || (LA91_1 >= 126 && LA91_1 <= 127)))
                            {
                                alt91 = 2;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                NoViableAltException nvae = new NoViableAltException("", 91, 1, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 91, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(91); }
                    switch (alt91)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:626:4: '{' '..' '}'
                            {
                                DebugLocation(626, 4);
                                char_literal309 = (IToken)Match(input, 99, Follow._99_in_paralDef23348); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_99.Add(char_literal309);

                                DebugLocation(626, 8);
                                string_literal310 = (IToken)Match(input, 130, Follow._130_in_paralDef23350); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_130.Add(string_literal310);

                                DebugLocation(626, 13);
                                char_literal311 = (IToken)Match(input, 100, Follow._100_in_paralDef23352); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_100.Add(char_literal311);

                                DebugLocation(626, 17);
                                if (state.backtracking == 0)
                                {
                                    IsParameterized = true; HasArbitraryProcess = true;
                                }


                                {
                                    // AST REWRITE
                                    // elements: 
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 626:72: -> ^( PARADEF2_NODE )
                                        {
                                            DebugLocation(626, 75);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:626:75: ^( PARADEF2_NODE )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(626, 77);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(PARADEF2_NODE, "PARADEF2_NODE"), root_1);

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:627:4: '{' int1= additiveExpression '}'
                            {
                                DebugLocation(627, 4);
                                char_literal312 = (IToken)Match(input, 99, Follow._99_in_paralDef23366); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_99.Add(char_literal312);

                                DebugLocation(627, 12);
                                PushFollow(Follow._additiveExpression_in_paralDef23370);
                                int1 = additiveExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_additiveExpression.Add(int1.Tree);
                                DebugLocation(627, 32);
                                char_literal313 = (IToken)Match(input, 100, Follow._100_in_paralDef23372); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_100.Add(char_literal313);

                                DebugLocation(627, 36);
                                if (state.backtracking == 0)
                                {
                                    IsParameterized = true;
                                }


                                {
                                    // AST REWRITE
                                    // elements: int1
                                    // token labels: 
                                    // rule labels: retval, int1
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                        RewriteRuleSubtreeStream stream_int1 = new RewriteRuleSubtreeStream(adaptor, "rule int1", int1 != null ? int1.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 627:63: -> ^( PARADEF2_NODE $int1)
                                        {
                                            DebugLocation(627, 66);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:627:66: ^( PARADEF2_NODE $int1)
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(627, 68);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(PARADEF2_NODE, "PARADEF2_NODE"), root_1);

                                                DebugLocation(627, 82);
                                                adaptor.AddChild(root_1, stream_int1.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("paralDef2", 39);
                    LeaveRule("paralDef2", 39);
                    Leave_paralDef2();
                    if (state.backtracking > 0) { Memoize(input, 39, paralDef2_StartIndex); }
                }
                DebugLocation(628, 1);
            }
            finally { DebugExitRule(GrammarFileName, "paralDef2"); }
            return retval;

        }
        // $ANTLR end "paralDef2"

        public class generalChoiceExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_generalChoiceExpr();
        partial void Leave_generalChoiceExpr();

        // $ANTLR start "generalChoiceExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:632:1: generalChoiceExpr : (p= internalChoiceExpr ( ( '[]' internalChoiceExpr )+ -> ^( '[]' ( internalChoiceExpr )+ ) | -> $p) | '[]' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( GENERAL_CHOICE_NODE ( paralDef )+ interleaveExpr ) );
        [GrammarRule("generalChoiceExpr")]
        private PNTreeParser.generalChoiceExpr_return generalChoiceExpr()
        {
            Enter_generalChoiceExpr();
            EnterRule("generalChoiceExpr", 40);
            TraceIn("generalChoiceExpr", 40);
            PNTreeParser.generalChoiceExpr_return retval = new PNTreeParser.generalChoiceExpr_return();
            retval.Start = (IToken)input.LT(1);
            int generalChoiceExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal314 = null;
            IToken string_literal316 = null;
            IToken char_literal318 = null;
            IToken char_literal320 = null;
            PNTreeParser.internalChoiceExpr_return p = default(PNTreeParser.internalChoiceExpr_return);
            PNTreeParser.internalChoiceExpr_return internalChoiceExpr315 = default(PNTreeParser.internalChoiceExpr_return);
            PNTreeParser.paralDef_return paralDef317 = default(PNTreeParser.paralDef_return);
            PNTreeParser.paralDef_return paralDef319 = default(PNTreeParser.paralDef_return);
            PNTreeParser.interleaveExpr_return interleaveExpr321 = default(PNTreeParser.interleaveExpr_return);

            CommonTree string_literal314_tree = null;
            CommonTree string_literal316_tree = null;
            CommonTree char_literal318_tree = null;
            CommonTree char_literal320_tree = null;
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_140 = new RewriteRuleITokenStream(adaptor, "token 140");
            RewriteRuleITokenStream stream_74 = new RewriteRuleITokenStream(adaptor, "token 74");
            RewriteRuleSubtreeStream stream_paralDef = new RewriteRuleSubtreeStream(adaptor, "rule paralDef");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            RewriteRuleSubtreeStream stream_internalChoiceExpr = new RewriteRuleSubtreeStream(adaptor, "rule internalChoiceExpr");
            paraphrases.Push("in general choice process");
            try
            {
                DebugEnterRule(GrammarFileName, "generalChoiceExpr");
                DebugLocation(632, 5);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 40)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:637:2: (p= internalChoiceExpr ( ( '[]' internalChoiceExpr )+ -> ^( '[]' ( internalChoiceExpr )+ ) | -> $p) | '[]' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( GENERAL_CHOICE_NODE ( paralDef )+ interleaveExpr ) )
                    int alt95 = 2;
                    try
                    {
                        DebugEnterDecision(95, decisionCanBacktrack[95]);
                        int LA95_0 = input.LA(1);

                        if ((LA95_0 == ID || LA95_0 == 70 || LA95_0 == 72 || LA95_0 == 75 || LA95_0 == 80 || LA95_0 == 99 || LA95_0 == 108 || LA95_0 == 131 || LA95_0 == 141 || LA95_0 == 144 || (LA95_0 >= 146 && LA95_0 <= 150)))
                        {
                            alt95 = 1;
                        }
                        else if ((LA95_0 == 74))
                        {
                            alt95 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 95, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(95); }
                    switch (alt95)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:637:4: p= internalChoiceExpr ( ( '[]' internalChoiceExpr )+ -> ^( '[]' ( internalChoiceExpr )+ ) | -> $p)
                            {
                                DebugLocation(637, 5);
                                PushFollow(Follow._internalChoiceExpr_in_generalChoiceExpr3419);
                                p = internalChoiceExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_internalChoiceExpr.Add(p.Tree);
                                DebugLocation(638, 4);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:638:4: ( ( '[]' internalChoiceExpr )+ -> ^( '[]' ( internalChoiceExpr )+ ) | -> $p)
                                int alt93 = 2;
                                try
                                {
                                    DebugEnterSubRule(93);
                                    try
                                    {
                                        DebugEnterDecision(93, decisionCanBacktrack[93]);
                                        int LA93_0 = input.LA(1);

                                        if ((LA93_0 == 74))
                                        {
                                            int LA93_1 = input.LA(2);

                                            if ((EvaluatePredicate(synpred149_PNTree_fragment)))
                                            {
                                                alt93 = 1;
                                            }
                                            else if ((true))
                                            {
                                                alt93 = 2;
                                            }
                                            else
                                            {
                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                NoViableAltException nvae = new NoViableAltException("", 93, 1, input);

                                                DebugRecognitionException(nvae);
                                                throw nvae;
                                            }
                                        }
                                        else if ((LA93_0 == EOF || (LA93_0 >= ID && LA93_0 <= INT) || LA93_0 == 68 || (LA93_0 >= 72 && LA93_0 <= 73) || (LA93_0 >= 75 && LA93_0 <= 76) || LA93_0 == 79 || LA93_0 == 100 || (LA93_0 >= 102 && LA93_0 <= 104) || LA93_0 == 120 || (LA93_0 >= 126 && LA93_0 <= 127) || LA93_0 == 139 || LA93_0 == 145))
                                        {
                                            alt93 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 93, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(93); }
                                    switch (alt93)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:5: ( '[]' internalChoiceExpr )+
                                            {
                                                DebugLocation(639, 5);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:5: ( '[]' internalChoiceExpr )+
                                                int cnt92 = 0;
                                                try
                                                {
                                                    DebugEnterSubRule(92);
                                                    while (true)
                                                    {
                                                        int alt92 = 2;
                                                        try
                                                        {
                                                            DebugEnterDecision(92, decisionCanBacktrack[92]);
                                                            int LA92_0 = input.LA(1);

                                                            if ((LA92_0 == 74))
                                                            {
                                                                int LA92_2 = input.LA(2);

                                                                if ((EvaluatePredicate(synpred148_PNTree_fragment)))
                                                                {
                                                                    alt92 = 1;
                                                                }


                                                            }


                                                        }
                                                        finally { DebugExitDecision(92); }
                                                        switch (alt92)
                                                        {
                                                            case 1:
                                                                DebugEnterAlt(1);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:6: '[]' internalChoiceExpr
                                                                {
                                                                    DebugLocation(639, 6);
                                                                    string_literal314 = (IToken)Match(input, 74, Follow._74_in_generalChoiceExpr3431); if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_74.Add(string_literal314);

                                                                    DebugLocation(639, 11);
                                                                    PushFollow(Follow._internalChoiceExpr_in_generalChoiceExpr3433);
                                                                    internalChoiceExpr315 = internalChoiceExpr();
                                                                    PopFollow();
                                                                    if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_internalChoiceExpr.Add(internalChoiceExpr315.Tree);

                                                                }
                                                                break;

                                                            default:
                                                                if (cnt92 >= 1)
                                                                    goto loop92;

                                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                                EarlyExitException eee92 = new EarlyExitException(92, input);
                                                                DebugRecognitionException(eee92);
                                                                throw eee92;
                                                        }
                                                        cnt92++;
                                                    }
                                                loop92:
                                                    ;

                                                }
                                                finally { DebugExitSubRule(92); }



                                                {
                                                    // AST REWRITE
                                                    // elements: 74, internalChoiceExpr
                                                    // token labels: 
                                                    // rule labels: retval
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 639:33: -> ^( '[]' ( internalChoiceExpr )+ )
                                                        {
                                                            DebugLocation(639, 36);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:36: ^( '[]' ( internalChoiceExpr )+ )
                                                            {
                                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                                DebugLocation(639, 38);
                                                                root_1 = (CommonTree)adaptor.BecomeRoot(stream_74.NextNode(), root_1);

                                                                DebugLocation(639, 43);
                                                                if (!(stream_internalChoiceExpr.HasNext))
                                                                {
                                                                    throw new RewriteEarlyExitException();
                                                                }
                                                                while (stream_internalChoiceExpr.HasNext)
                                                                {
                                                                    DebugLocation(639, 43);
                                                                    adaptor.AddChild(root_1, stream_internalChoiceExpr.NextTree());

                                                                }
                                                                stream_internalChoiceExpr.Reset();

                                                                adaptor.AddChild(root_0, root_1);
                                                            }

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:640:7: 
                                            {

                                                {
                                                    // AST REWRITE
                                                    // elements: p
                                                    // token labels: 
                                                    // rule labels: retval, p
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                                        RewriteRuleSubtreeStream stream_p = new RewriteRuleSubtreeStream(adaptor, "rule p", p != null ? p.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 640:7: -> $p
                                                        {
                                                            DebugLocation(640, 10);
                                                            adaptor.AddChild(root_0, stream_p.NextTree());

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(93); }


                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:643:4: '[]' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr
                            {
                                DebugLocation(643, 4);
                                string_literal316 = (IToken)Match(input, 74, Follow._74_in_generalChoiceExpr3471); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_74.Add(string_literal316);

                                DebugLocation(643, 9);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:643:9: ( paralDef ( ';' paralDef )* )
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:643:10: paralDef ( ';' paralDef )*
                                {
                                    DebugLocation(643, 10);
                                    PushFollow(Follow._paralDef_in_generalChoiceExpr3474);
                                    paralDef317 = paralDef();
                                    PopFollow();
                                    if (state.failed) return retval;
                                    if (state.backtracking == 0) stream_paralDef.Add(paralDef317.Tree);
                                    DebugLocation(643, 19);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:643:19: ( ';' paralDef )*
                                    try
                                    {
                                        DebugEnterSubRule(94);
                                        while (true)
                                        {
                                            int alt94 = 2;
                                            try
                                            {
                                                DebugEnterDecision(94, decisionCanBacktrack[94]);
                                                int LA94_0 = input.LA(1);

                                                if ((LA94_0 == 68))
                                                {
                                                    alt94 = 1;
                                                }


                                            }
                                            finally { DebugExitDecision(94); }
                                            switch (alt94)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:643:20: ';' paralDef
                                                    {
                                                        DebugLocation(643, 20);
                                                        char_literal318 = (IToken)Match(input, 68, Follow._68_in_generalChoiceExpr3477); if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_68.Add(char_literal318);

                                                        DebugLocation(643, 24);
                                                        PushFollow(Follow._paralDef_in_generalChoiceExpr3479);
                                                        paralDef319 = paralDef();
                                                        PopFollow();
                                                        if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_paralDef.Add(paralDef319.Tree);

                                                    }
                                                    break;

                                                default:
                                                    goto loop94;
                                            }
                                        }

                                    loop94:
                                        ;

                                    }
                                    finally { DebugExitSubRule(94); }


                                }

                                DebugLocation(643, 37);
                                char_literal320 = (IToken)Match(input, 140, Follow._140_in_generalChoiceExpr3485); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_140.Add(char_literal320);

                                DebugLocation(643, 41);
                                PushFollow(Follow._interleaveExpr_in_generalChoiceExpr3487);
                                interleaveExpr321 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr321.Tree);


                                {
                                    // AST REWRITE
                                    // elements: interleaveExpr, paralDef
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 643:56: -> ^( GENERAL_CHOICE_NODE ( paralDef )+ interleaveExpr )
                                        {
                                            DebugLocation(643, 59);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:643:59: ^( GENERAL_CHOICE_NODE ( paralDef )+ interleaveExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(643, 61);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(GENERAL_CHOICE_NODE, "GENERAL_CHOICE_NODE"), root_1);

                                                DebugLocation(643, 81);
                                                if (!(stream_paralDef.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_paralDef.HasNext)
                                                {
                                                    DebugLocation(643, 81);
                                                    adaptor.AddChild(root_1, stream_paralDef.NextTree());

                                                }
                                                stream_paralDef.Reset();
                                                DebugLocation(643, 91);
                                                adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("generalChoiceExpr", 40);
                    LeaveRule("generalChoiceExpr", 40);
                    Leave_generalChoiceExpr();
                    if (state.backtracking > 0) { Memoize(input, 40, generalChoiceExpr_StartIndex); }
                }
                DebugLocation(644, 5);
            }
            finally { DebugExitRule(GrammarFileName, "generalChoiceExpr"); }
            return retval;

        }
        // $ANTLR end "generalChoiceExpr"

        public class internalChoiceExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_internalChoiceExpr();
        partial void Leave_internalChoiceExpr();

        // $ANTLR start "internalChoiceExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:646:1: internalChoiceExpr : (p= externalChoiceExpr ( ( '<>' externalChoiceExpr )+ -> ^( '<>' ( externalChoiceExpr )+ ) | -> $p) | '<>' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( INTERNAL_CHOICE_NODE ( paralDef )+ interleaveExpr ) );
        [GrammarRule("internalChoiceExpr")]
        private PNTreeParser.internalChoiceExpr_return internalChoiceExpr()
        {
            Enter_internalChoiceExpr();
            EnterRule("internalChoiceExpr", 41);
            TraceIn("internalChoiceExpr", 41);
            PNTreeParser.internalChoiceExpr_return retval = new PNTreeParser.internalChoiceExpr_return();
            retval.Start = (IToken)input.LT(1);
            int internalChoiceExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal322 = null;
            IToken string_literal324 = null;
            IToken char_literal326 = null;
            IToken char_literal328 = null;
            PNTreeParser.externalChoiceExpr_return p = default(PNTreeParser.externalChoiceExpr_return);
            PNTreeParser.externalChoiceExpr_return externalChoiceExpr323 = default(PNTreeParser.externalChoiceExpr_return);
            PNTreeParser.paralDef_return paralDef325 = default(PNTreeParser.paralDef_return);
            PNTreeParser.paralDef_return paralDef327 = default(PNTreeParser.paralDef_return);
            PNTreeParser.interleaveExpr_return interleaveExpr329 = default(PNTreeParser.interleaveExpr_return);

            CommonTree string_literal322_tree = null;
            CommonTree string_literal324_tree = null;
            CommonTree char_literal326_tree = null;
            CommonTree char_literal328_tree = null;
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_140 = new RewriteRuleITokenStream(adaptor, "token 140");
            RewriteRuleITokenStream stream_75 = new RewriteRuleITokenStream(adaptor, "token 75");
            RewriteRuleSubtreeStream stream_externalChoiceExpr = new RewriteRuleSubtreeStream(adaptor, "rule externalChoiceExpr");
            RewriteRuleSubtreeStream stream_paralDef = new RewriteRuleSubtreeStream(adaptor, "rule paralDef");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            paraphrases.Push("in internal choice process");
            try
            {
                DebugEnterRule(GrammarFileName, "internalChoiceExpr");
                DebugLocation(646, 5);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 41)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:651:2: (p= externalChoiceExpr ( ( '<>' externalChoiceExpr )+ -> ^( '<>' ( externalChoiceExpr )+ ) | -> $p) | '<>' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( INTERNAL_CHOICE_NODE ( paralDef )+ interleaveExpr ) )
                    int alt99 = 2;
                    try
                    {
                        DebugEnterDecision(99, decisionCanBacktrack[99]);
                        int LA99_0 = input.LA(1);

                        if ((LA99_0 == ID || LA99_0 == 70 || LA99_0 == 72 || LA99_0 == 80 || LA99_0 == 99 || LA99_0 == 108 || LA99_0 == 131 || LA99_0 == 141 || LA99_0 == 144 || (LA99_0 >= 146 && LA99_0 <= 150)))
                        {
                            alt99 = 1;
                        }
                        else if ((LA99_0 == 75))
                        {
                            alt99 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 99, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(99); }
                    switch (alt99)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:651:4: p= externalChoiceExpr ( ( '<>' externalChoiceExpr )+ -> ^( '<>' ( externalChoiceExpr )+ ) | -> $p)
                            {
                                DebugLocation(651, 5);
                                PushFollow(Follow._externalChoiceExpr_in_internalChoiceExpr3541);
                                p = externalChoiceExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_externalChoiceExpr.Add(p.Tree);
                                DebugLocation(652, 4);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:652:4: ( ( '<>' externalChoiceExpr )+ -> ^( '<>' ( externalChoiceExpr )+ ) | -> $p)
                                int alt97 = 2;
                                try
                                {
                                    DebugEnterSubRule(97);
                                    try
                                    {
                                        DebugEnterDecision(97, decisionCanBacktrack[97]);
                                        int LA97_0 = input.LA(1);

                                        if ((LA97_0 == 75))
                                        {
                                            int LA97_1 = input.LA(2);

                                            if ((EvaluatePredicate(synpred153_PNTree_fragment)))
                                            {
                                                alt97 = 1;
                                            }
                                            else if ((true))
                                            {
                                                alt97 = 2;
                                            }
                                            else
                                            {
                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                NoViableAltException nvae = new NoViableAltException("", 97, 1, input);

                                                DebugRecognitionException(nvae);
                                                throw nvae;
                                            }
                                        }
                                        else if ((LA97_0 == EOF || (LA97_0 >= ID && LA97_0 <= INT) || LA97_0 == 68 || (LA97_0 >= 72 && LA97_0 <= 74) || LA97_0 == 76 || LA97_0 == 79 || LA97_0 == 100 || (LA97_0 >= 102 && LA97_0 <= 104) || LA97_0 == 120 || (LA97_0 >= 126 && LA97_0 <= 127) || LA97_0 == 139 || LA97_0 == 145))
                                        {
                                            alt97 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 97, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(97); }
                                    switch (alt97)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:5: ( '<>' externalChoiceExpr )+
                                            {
                                                DebugLocation(653, 5);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:5: ( '<>' externalChoiceExpr )+
                                                int cnt96 = 0;
                                                try
                                                {
                                                    DebugEnterSubRule(96);
                                                    while (true)
                                                    {
                                                        int alt96 = 2;
                                                        try
                                                        {
                                                            DebugEnterDecision(96, decisionCanBacktrack[96]);
                                                            int LA96_0 = input.LA(1);

                                                            if ((LA96_0 == 75))
                                                            {
                                                                int LA96_2 = input.LA(2);

                                                                if ((EvaluatePredicate(synpred152_PNTree_fragment)))
                                                                {
                                                                    alt96 = 1;
                                                                }


                                                            }


                                                        }
                                                        finally { DebugExitDecision(96); }
                                                        switch (alt96)
                                                        {
                                                            case 1:
                                                                DebugEnterAlt(1);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:6: '<>' externalChoiceExpr
                                                                {
                                                                    DebugLocation(653, 6);
                                                                    string_literal322 = (IToken)Match(input, 75, Follow._75_in_internalChoiceExpr3553); if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_75.Add(string_literal322);

                                                                    DebugLocation(653, 11);
                                                                    PushFollow(Follow._externalChoiceExpr_in_internalChoiceExpr3555);
                                                                    externalChoiceExpr323 = externalChoiceExpr();
                                                                    PopFollow();
                                                                    if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_externalChoiceExpr.Add(externalChoiceExpr323.Tree);

                                                                }
                                                                break;

                                                            default:
                                                                if (cnt96 >= 1)
                                                                    goto loop96;

                                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                                EarlyExitException eee96 = new EarlyExitException(96, input);
                                                                DebugRecognitionException(eee96);
                                                                throw eee96;
                                                        }
                                                        cnt96++;
                                                    }
                                                loop96:
                                                    ;

                                                }
                                                finally { DebugExitSubRule(96); }



                                                {
                                                    // AST REWRITE
                                                    // elements: 75, externalChoiceExpr
                                                    // token labels: 
                                                    // rule labels: retval
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 653:33: -> ^( '<>' ( externalChoiceExpr )+ )
                                                        {
                                                            DebugLocation(653, 36);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:36: ^( '<>' ( externalChoiceExpr )+ )
                                                            {
                                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                                DebugLocation(653, 38);
                                                                root_1 = (CommonTree)adaptor.BecomeRoot(stream_75.NextNode(), root_1);

                                                                DebugLocation(653, 43);
                                                                if (!(stream_externalChoiceExpr.HasNext))
                                                                {
                                                                    throw new RewriteEarlyExitException();
                                                                }
                                                                while (stream_externalChoiceExpr.HasNext)
                                                                {
                                                                    DebugLocation(653, 43);
                                                                    adaptor.AddChild(root_1, stream_externalChoiceExpr.NextTree());

                                                                }
                                                                stream_externalChoiceExpr.Reset();

                                                                adaptor.AddChild(root_0, root_1);
                                                            }

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:654:7: 
                                            {

                                                {
                                                    // AST REWRITE
                                                    // elements: p
                                                    // token labels: 
                                                    // rule labels: retval, p
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                                        RewriteRuleSubtreeStream stream_p = new RewriteRuleSubtreeStream(adaptor, "rule p", p != null ? p.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 654:7: -> $p
                                                        {
                                                            DebugLocation(654, 10);
                                                            adaptor.AddChild(root_0, stream_p.NextTree());

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(97); }


                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:657:4: '<>' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr
                            {
                                DebugLocation(657, 4);
                                string_literal324 = (IToken)Match(input, 75, Follow._75_in_internalChoiceExpr3593); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_75.Add(string_literal324);

                                DebugLocation(657, 9);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:657:9: ( paralDef ( ';' paralDef )* )
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:657:10: paralDef ( ';' paralDef )*
                                {
                                    DebugLocation(657, 10);
                                    PushFollow(Follow._paralDef_in_internalChoiceExpr3596);
                                    paralDef325 = paralDef();
                                    PopFollow();
                                    if (state.failed) return retval;
                                    if (state.backtracking == 0) stream_paralDef.Add(paralDef325.Tree);
                                    DebugLocation(657, 19);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:657:19: ( ';' paralDef )*
                                    try
                                    {
                                        DebugEnterSubRule(98);
                                        while (true)
                                        {
                                            int alt98 = 2;
                                            try
                                            {
                                                DebugEnterDecision(98, decisionCanBacktrack[98]);
                                                int LA98_0 = input.LA(1);

                                                if ((LA98_0 == 68))
                                                {
                                                    alt98 = 1;
                                                }


                                            }
                                            finally { DebugExitDecision(98); }
                                            switch (alt98)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:657:20: ';' paralDef
                                                    {
                                                        DebugLocation(657, 20);
                                                        char_literal326 = (IToken)Match(input, 68, Follow._68_in_internalChoiceExpr3599); if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_68.Add(char_literal326);

                                                        DebugLocation(657, 24);
                                                        PushFollow(Follow._paralDef_in_internalChoiceExpr3601);
                                                        paralDef327 = paralDef();
                                                        PopFollow();
                                                        if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_paralDef.Add(paralDef327.Tree);

                                                    }
                                                    break;

                                                default:
                                                    goto loop98;
                                            }
                                        }

                                    loop98:
                                        ;

                                    }
                                    finally { DebugExitSubRule(98); }


                                }

                                DebugLocation(657, 37);
                                char_literal328 = (IToken)Match(input, 140, Follow._140_in_internalChoiceExpr3607); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_140.Add(char_literal328);

                                DebugLocation(657, 41);
                                PushFollow(Follow._interleaveExpr_in_internalChoiceExpr3609);
                                interleaveExpr329 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr329.Tree);


                                {
                                    // AST REWRITE
                                    // elements: interleaveExpr, paralDef
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 657:56: -> ^( INTERNAL_CHOICE_NODE ( paralDef )+ interleaveExpr )
                                        {
                                            DebugLocation(657, 59);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:657:59: ^( INTERNAL_CHOICE_NODE ( paralDef )+ interleaveExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(657, 61);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(INTERNAL_CHOICE_NODE, "INTERNAL_CHOICE_NODE"), root_1);

                                                DebugLocation(657, 82);
                                                if (!(stream_paralDef.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_paralDef.HasNext)
                                                {
                                                    DebugLocation(657, 82);
                                                    adaptor.AddChild(root_1, stream_paralDef.NextTree());

                                                }
                                                stream_paralDef.Reset();
                                                DebugLocation(657, 92);
                                                adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("internalChoiceExpr", 41);
                    LeaveRule("internalChoiceExpr", 41);
                    Leave_internalChoiceExpr();
                    if (state.backtracking > 0) { Memoize(input, 41, internalChoiceExpr_StartIndex); }
                }
                DebugLocation(658, 5);
            }
            finally { DebugExitRule(GrammarFileName, "internalChoiceExpr"); }
            return retval;

        }
        // $ANTLR end "internalChoiceExpr"

        public class externalChoiceExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_externalChoiceExpr();
        partial void Leave_externalChoiceExpr();

        // $ANTLR start "externalChoiceExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:662:1: externalChoiceExpr : (p= interruptExpr ( ( '[*]' interruptExpr )+ -> ^( '[*]' ( interruptExpr )+ ) | -> $p) | '[*]' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( EXTERNAL_CHOICE_NODE ( paralDef )+ interleaveExpr ) );
        [GrammarRule("externalChoiceExpr")]
        private PNTreeParser.externalChoiceExpr_return externalChoiceExpr()
        {
            Enter_externalChoiceExpr();
            EnterRule("externalChoiceExpr", 42);
            TraceIn("externalChoiceExpr", 42);
            PNTreeParser.externalChoiceExpr_return retval = new PNTreeParser.externalChoiceExpr_return();
            retval.Start = (IToken)input.LT(1);
            int externalChoiceExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal330 = null;
            IToken string_literal332 = null;
            IToken char_literal334 = null;
            IToken char_literal336 = null;
            PNTreeParser.interruptExpr_return p = default(PNTreeParser.interruptExpr_return);
            PNTreeParser.interruptExpr_return interruptExpr331 = default(PNTreeParser.interruptExpr_return);
            PNTreeParser.paralDef_return paralDef333 = default(PNTreeParser.paralDef_return);
            PNTreeParser.paralDef_return paralDef335 = default(PNTreeParser.paralDef_return);
            PNTreeParser.interleaveExpr_return interleaveExpr337 = default(PNTreeParser.interleaveExpr_return);

            CommonTree string_literal330_tree = null;
            CommonTree string_literal332_tree = null;
            CommonTree char_literal334_tree = null;
            CommonTree char_literal336_tree = null;
            RewriteRuleITokenStream stream_68 = new RewriteRuleITokenStream(adaptor, "token 68");
            RewriteRuleITokenStream stream_140 = new RewriteRuleITokenStream(adaptor, "token 140");
            RewriteRuleITokenStream stream_141 = new RewriteRuleITokenStream(adaptor, "token 141");
            RewriteRuleSubtreeStream stream_interruptExpr = new RewriteRuleSubtreeStream(adaptor, "rule interruptExpr");
            RewriteRuleSubtreeStream stream_paralDef = new RewriteRuleSubtreeStream(adaptor, "rule paralDef");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            paraphrases.Push("in external choice process");
            try
            {
                DebugEnterRule(GrammarFileName, "externalChoiceExpr");
                DebugLocation(662, 5);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 42)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:667:2: (p= interruptExpr ( ( '[*]' interruptExpr )+ -> ^( '[*]' ( interruptExpr )+ ) | -> $p) | '[*]' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr -> ^( EXTERNAL_CHOICE_NODE ( paralDef )+ interleaveExpr ) )
                    int alt103 = 2;
                    try
                    {
                        DebugEnterDecision(103, decisionCanBacktrack[103]);
                        int LA103_0 = input.LA(1);

                        if ((LA103_0 == ID || LA103_0 == 70 || LA103_0 == 72 || LA103_0 == 80 || LA103_0 == 99 || LA103_0 == 108 || LA103_0 == 131 || LA103_0 == 144 || (LA103_0 >= 146 && LA103_0 <= 150)))
                        {
                            alt103 = 1;
                        }
                        else if ((LA103_0 == 141))
                        {
                            alt103 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 103, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(103); }
                    switch (alt103)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:667:4: p= interruptExpr ( ( '[*]' interruptExpr )+ -> ^( '[*]' ( interruptExpr )+ ) | -> $p)
                            {
                                DebugLocation(667, 5);
                                PushFollow(Follow._interruptExpr_in_externalChoiceExpr3656);
                                p = interruptExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interruptExpr.Add(p.Tree);
                                DebugLocation(668, 4);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:668:4: ( ( '[*]' interruptExpr )+ -> ^( '[*]' ( interruptExpr )+ ) | -> $p)
                                int alt101 = 2;
                                try
                                {
                                    DebugEnterSubRule(101);
                                    try
                                    {
                                        DebugEnterDecision(101, decisionCanBacktrack[101]);
                                        int LA101_0 = input.LA(1);

                                        if ((LA101_0 == 141))
                                        {
                                            alt101 = 1;
                                        }
                                        else if ((LA101_0 == EOF || (LA101_0 >= ID && LA101_0 <= INT) || LA101_0 == 68 || (LA101_0 >= 72 && LA101_0 <= 76) || LA101_0 == 79 || LA101_0 == 100 || (LA101_0 >= 102 && LA101_0 <= 104) || LA101_0 == 120 || (LA101_0 >= 126 && LA101_0 <= 127) || LA101_0 == 139 || LA101_0 == 145))
                                        {
                                            alt101 = 2;
                                        }
                                        else
                                        {
                                            if (state.backtracking > 0) { state.failed = true; return retval; }
                                            NoViableAltException nvae = new NoViableAltException("", 101, 0, input);

                                            DebugRecognitionException(nvae);
                                            throw nvae;
                                        }
                                    }
                                    finally { DebugExitDecision(101); }
                                    switch (alt101)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:669:5: ( '[*]' interruptExpr )+
                                            {
                                                DebugLocation(669, 5);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:669:5: ( '[*]' interruptExpr )+
                                                int cnt100 = 0;
                                                try
                                                {
                                                    DebugEnterSubRule(100);
                                                    while (true)
                                                    {
                                                        int alt100 = 2;
                                                        try
                                                        {
                                                            DebugEnterDecision(100, decisionCanBacktrack[100]);
                                                            int LA100_0 = input.LA(1);

                                                            if ((LA100_0 == 141))
                                                            {
                                                                alt100 = 1;
                                                            }


                                                        }
                                                        finally { DebugExitDecision(100); }
                                                        switch (alt100)
                                                        {
                                                            case 1:
                                                                DebugEnterAlt(1);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:669:6: '[*]' interruptExpr
                                                                {
                                                                    DebugLocation(669, 6);
                                                                    string_literal330 = (IToken)Match(input, 141, Follow._141_in_externalChoiceExpr3668); if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_141.Add(string_literal330);

                                                                    DebugLocation(669, 12);
                                                                    PushFollow(Follow._interruptExpr_in_externalChoiceExpr3670);
                                                                    interruptExpr331 = interruptExpr();
                                                                    PopFollow();
                                                                    if (state.failed) return retval;
                                                                    if (state.backtracking == 0) stream_interruptExpr.Add(interruptExpr331.Tree);

                                                                }
                                                                break;

                                                            default:
                                                                if (cnt100 >= 1)
                                                                    goto loop100;

                                                                if (state.backtracking > 0) { state.failed = true; return retval; }
                                                                EarlyExitException eee100 = new EarlyExitException(100, input);
                                                                DebugRecognitionException(eee100);
                                                                throw eee100;
                                                        }
                                                        cnt100++;
                                                    }
                                                loop100:
                                                    ;

                                                }
                                                finally { DebugExitSubRule(100); }



                                                {
                                                    // AST REWRITE
                                                    // elements: 141, interruptExpr
                                                    // token labels: 
                                                    // rule labels: retval
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 669:29: -> ^( '[*]' ( interruptExpr )+ )
                                                        {
                                                            DebugLocation(669, 32);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:669:32: ^( '[*]' ( interruptExpr )+ )
                                                            {
                                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                                DebugLocation(669, 34);
                                                                root_1 = (CommonTree)adaptor.BecomeRoot(stream_141.NextNode(), root_1);

                                                                DebugLocation(669, 40);
                                                                if (!(stream_interruptExpr.HasNext))
                                                                {
                                                                    throw new RewriteEarlyExitException();
                                                                }
                                                                while (stream_interruptExpr.HasNext)
                                                                {
                                                                    DebugLocation(669, 40);
                                                                    adaptor.AddChild(root_1, stream_interruptExpr.NextTree());

                                                                }
                                                                stream_interruptExpr.Reset();

                                                                adaptor.AddChild(root_0, root_1);
                                                            }

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;
                                        case 2:
                                            DebugEnterAlt(2);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:670:7: 
                                            {

                                                {
                                                    // AST REWRITE
                                                    // elements: p
                                                    // token labels: 
                                                    // rule labels: retval, p
                                                    // token list labels: 
                                                    // rule list labels: 
                                                    // wildcard labels: 
                                                    if (state.backtracking == 0)
                                                    {
                                                        retval.Tree = root_0;
                                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                                        RewriteRuleSubtreeStream stream_p = new RewriteRuleSubtreeStream(adaptor, "rule p", p != null ? p.Tree : null);

                                                        root_0 = (CommonTree)adaptor.Nil();
                                                        // 670:7: -> $p
                                                        {
                                                            DebugLocation(670, 10);
                                                            adaptor.AddChild(root_0, stream_p.NextTree());

                                                        }

                                                        retval.Tree = root_0;
                                                    }
                                                }

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(101); }


                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:673:4: '[*]' ( paralDef ( ';' paralDef )* ) '@' interleaveExpr
                            {
                                DebugLocation(673, 4);
                                string_literal332 = (IToken)Match(input, 141, Follow._141_in_externalChoiceExpr3708); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_141.Add(string_literal332);

                                DebugLocation(673, 10);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:673:10: ( paralDef ( ';' paralDef )* )
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:673:11: paralDef ( ';' paralDef )*
                                {
                                    DebugLocation(673, 11);
                                    PushFollow(Follow._paralDef_in_externalChoiceExpr3711);
                                    paralDef333 = paralDef();
                                    PopFollow();
                                    if (state.failed) return retval;
                                    if (state.backtracking == 0) stream_paralDef.Add(paralDef333.Tree);
                                    DebugLocation(673, 20);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:673:20: ( ';' paralDef )*
                                    try
                                    {
                                        DebugEnterSubRule(102);
                                        while (true)
                                        {
                                            int alt102 = 2;
                                            try
                                            {
                                                DebugEnterDecision(102, decisionCanBacktrack[102]);
                                                int LA102_0 = input.LA(1);

                                                if ((LA102_0 == 68))
                                                {
                                                    alt102 = 1;
                                                }


                                            }
                                            finally { DebugExitDecision(102); }
                                            switch (alt102)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:673:21: ';' paralDef
                                                    {
                                                        DebugLocation(673, 21);
                                                        char_literal334 = (IToken)Match(input, 68, Follow._68_in_externalChoiceExpr3714); if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_68.Add(char_literal334);

                                                        DebugLocation(673, 25);
                                                        PushFollow(Follow._paralDef_in_externalChoiceExpr3716);
                                                        paralDef335 = paralDef();
                                                        PopFollow();
                                                        if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_paralDef.Add(paralDef335.Tree);

                                                    }
                                                    break;

                                                default:
                                                    goto loop102;
                                            }
                                        }

                                    loop102:
                                        ;

                                    }
                                    finally { DebugExitSubRule(102); }


                                }

                                DebugLocation(673, 38);
                                char_literal336 = (IToken)Match(input, 140, Follow._140_in_externalChoiceExpr3722); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_140.Add(char_literal336);

                                DebugLocation(673, 42);
                                PushFollow(Follow._interleaveExpr_in_externalChoiceExpr3724);
                                interleaveExpr337 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr337.Tree);


                                {
                                    // AST REWRITE
                                    // elements: interleaveExpr, paralDef
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 673:57: -> ^( EXTERNAL_CHOICE_NODE ( paralDef )+ interleaveExpr )
                                        {
                                            DebugLocation(673, 60);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:673:60: ^( EXTERNAL_CHOICE_NODE ( paralDef )+ interleaveExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(673, 62);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(EXTERNAL_CHOICE_NODE, "EXTERNAL_CHOICE_NODE"), root_1);

                                                DebugLocation(673, 83);
                                                if (!(stream_paralDef.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_paralDef.HasNext)
                                                {
                                                    DebugLocation(673, 83);
                                                    adaptor.AddChild(root_1, stream_paralDef.NextTree());

                                                }
                                                stream_paralDef.Reset();
                                                DebugLocation(673, 93);
                                                adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("externalChoiceExpr", 42);
                    LeaveRule("externalChoiceExpr", 42);
                    Leave_externalChoiceExpr();
                    if (state.backtracking > 0) { Memoize(input, 42, externalChoiceExpr_StartIndex); }
                }
                DebugLocation(674, 5);
            }
            finally { DebugExitRule(GrammarFileName, "externalChoiceExpr"); }
            return retval;

        }
        // $ANTLR end "externalChoiceExpr"

        public class interruptExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_interruptExpr();
        partial void Leave_interruptExpr();

        // $ANTLR start "interruptExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:676:1: interruptExpr : hidingExpr ( 'interrupt' hidingExpr )* ;
        [GrammarRule("interruptExpr")]
        private PNTreeParser.interruptExpr_return interruptExpr()
        {
            Enter_interruptExpr();
            EnterRule("interruptExpr", 43);
            TraceIn("interruptExpr", 43);
            PNTreeParser.interruptExpr_return retval = new PNTreeParser.interruptExpr_return();
            retval.Start = (IToken)input.LT(1);
            int interruptExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal339 = null;
            PNTreeParser.hidingExpr_return hidingExpr338 = default(PNTreeParser.hidingExpr_return);
            PNTreeParser.hidingExpr_return hidingExpr340 = default(PNTreeParser.hidingExpr_return);

            CommonTree string_literal339_tree = null;

            paraphrases.Push("in interrupt process");
            try
            {
                DebugEnterRule(GrammarFileName, "interruptExpr");
                DebugLocation(676, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 43)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:679:2: ( hidingExpr ( 'interrupt' hidingExpr )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:679:4: hidingExpr ( 'interrupt' hidingExpr )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(679, 4);
                        PushFollow(Follow._hidingExpr_in_interruptExpr3762);
                        hidingExpr338 = hidingExpr();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, hidingExpr338.Tree);
                        DebugLocation(679, 15);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:679:15: ( 'interrupt' hidingExpr )*
                        try
                        {
                            DebugEnterSubRule(104);
                            while (true)
                            {
                                int alt104 = 2;
                                try
                                {
                                    DebugEnterDecision(104, decisionCanBacktrack[104]);
                                    int LA104_0 = input.LA(1);

                                    if ((LA104_0 == 142))
                                    {
                                        alt104 = 1;
                                    }


                                }
                                finally { DebugExitDecision(104); }
                                switch (alt104)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:679:16: 'interrupt' hidingExpr
                                        {
                                            DebugLocation(679, 27);
                                            string_literal339 = (IToken)Match(input, 142, Follow._142_in_interruptExpr3765); if (state.failed) return retval;
                                            if (state.backtracking == 0)
                                            {
                                                string_literal339_tree = (CommonTree)adaptor.Create(string_literal339);
                                                root_0 = (CommonTree)adaptor.BecomeRoot(string_literal339_tree, root_0);
                                            }
                                            DebugLocation(679, 29);
                                            PushFollow(Follow._hidingExpr_in_interruptExpr3768);
                                            hidingExpr340 = hidingExpr();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, hidingExpr340.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop104;
                                }
                            }

                        loop104:
                            ;

                        }
                        finally { DebugExitSubRule(104); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("interruptExpr", 43);
                    LeaveRule("interruptExpr", 43);
                    Leave_interruptExpr();
                    if (state.backtracking > 0) { Memoize(input, 43, interruptExpr_StartIndex); }
                }
                DebugLocation(680, 1);
            }
            finally { DebugExitRule(GrammarFileName, "interruptExpr"); }
            return retval;

        }
        // $ANTLR end "interruptExpr"

        public class hidingExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_hidingExpr();
        partial void Leave_hidingExpr();

        // $ANTLR start "hidingExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:682:1: hidingExpr : sequentialExpr ( ( '\\\\' '{' eventName ( ',' eventName )* '}' ) -> ^( HIDING_ALPHA_NODE sequentialExpr ( eventName )+ ) | -> sequentialExpr ) ;
        [GrammarRule("hidingExpr")]
        private PNTreeParser.hidingExpr_return hidingExpr()
        {
            Enter_hidingExpr();
            EnterRule("hidingExpr", 44);
            TraceIn("hidingExpr", 44);
            PNTreeParser.hidingExpr_return retval = new PNTreeParser.hidingExpr_return();
            retval.Start = (IToken)input.LT(1);
            int hidingExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal342 = null;
            IToken char_literal343 = null;
            IToken char_literal345 = null;
            IToken char_literal347 = null;
            PNTreeParser.sequentialExpr_return sequentialExpr341 = default(PNTreeParser.sequentialExpr_return);
            PNTreeParser.eventName_return eventName344 = default(PNTreeParser.eventName_return);
            PNTreeParser.eventName_return eventName346 = default(PNTreeParser.eventName_return);

            CommonTree char_literal342_tree = null;
            CommonTree char_literal343_tree = null;
            CommonTree char_literal345_tree = null;
            CommonTree char_literal347_tree = null;
            RewriteRuleITokenStream stream_143 = new RewriteRuleITokenStream(adaptor, "token 143");
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_sequentialExpr = new RewriteRuleSubtreeStream(adaptor, "rule sequentialExpr");
            RewriteRuleSubtreeStream stream_eventName = new RewriteRuleSubtreeStream(adaptor, "rule eventName");
            paraphrases.Push("in hiding process");
            try
            {
                DebugEnterRule(GrammarFileName, "hidingExpr");
                DebugLocation(682, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 44)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:685:2: ( sequentialExpr ( ( '\\\\' '{' eventName ( ',' eventName )* '}' ) -> ^( HIDING_ALPHA_NODE sequentialExpr ( eventName )+ ) | -> sequentialExpr ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:686:3: sequentialExpr ( ( '\\\\' '{' eventName ( ',' eventName )* '}' ) -> ^( HIDING_ALPHA_NODE sequentialExpr ( eventName )+ ) | -> sequentialExpr )
                    {
                        DebugLocation(686, 3);
                        PushFollow(Follow._sequentialExpr_in_hidingExpr3798);
                        sequentialExpr341 = sequentialExpr();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) stream_sequentialExpr.Add(sequentialExpr341.Tree);
                        DebugLocation(687, 3);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:687:3: ( ( '\\\\' '{' eventName ( ',' eventName )* '}' ) -> ^( HIDING_ALPHA_NODE sequentialExpr ( eventName )+ ) | -> sequentialExpr )
                        int alt106 = 2;
                        try
                        {
                            DebugEnterSubRule(106);
                            try
                            {
                                DebugEnterDecision(106, decisionCanBacktrack[106]);
                                int LA106_0 = input.LA(1);

                                if ((LA106_0 == 143))
                                {
                                    alt106 = 1;
                                }
                                else if ((LA106_0 == EOF || (LA106_0 >= ID && LA106_0 <= INT) || LA106_0 == 68 || (LA106_0 >= 72 && LA106_0 <= 76) || LA106_0 == 79 || LA106_0 == 100 || (LA106_0 >= 102 && LA106_0 <= 104) || LA106_0 == 120 || (LA106_0 >= 126 && LA106_0 <= 127) || LA106_0 == 139 || (LA106_0 >= 141 && LA106_0 <= 142) || LA106_0 == 145))
                                {
                                    alt106 = 2;
                                }
                                else
                                {
                                    if (state.backtracking > 0) { state.failed = true; return retval; }
                                    NoViableAltException nvae = new NoViableAltException("", 106, 0, input);

                                    DebugRecognitionException(nvae);
                                    throw nvae;
                                }
                            }
                            finally { DebugExitDecision(106); }
                            switch (alt106)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:688:5: ( '\\\\' '{' eventName ( ',' eventName )* '}' )
                                    {
                                        DebugLocation(688, 5);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:688:5: ( '\\\\' '{' eventName ( ',' eventName )* '}' )
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:688:6: '\\\\' '{' eventName ( ',' eventName )* '}'
                                        {
                                            DebugLocation(688, 6);
                                            char_literal342 = (IToken)Match(input, 143, Follow._143_in_hidingExpr3810); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_143.Add(char_literal342);

                                            DebugLocation(688, 11);
                                            char_literal343 = (IToken)Match(input, 99, Follow._99_in_hidingExpr3812); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_99.Add(char_literal343);

                                            DebugLocation(688, 15);
                                            PushFollow(Follow._eventName_in_hidingExpr3814);
                                            eventName344 = eventName();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_eventName.Add(eventName344.Tree);
                                            DebugLocation(688, 26);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:688:26: ( ',' eventName )*
                                            try
                                            {
                                                DebugEnterSubRule(105);
                                                while (true)
                                                {
                                                    int alt105 = 2;
                                                    try
                                                    {
                                                        DebugEnterDecision(105, decisionCanBacktrack[105]);
                                                        int LA105_0 = input.LA(1);

                                                        if ((LA105_0 == 97))
                                                        {
                                                            alt105 = 1;
                                                        }


                                                    }
                                                    finally { DebugExitDecision(105); }
                                                    switch (alt105)
                                                    {
                                                        case 1:
                                                            DebugEnterAlt(1);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:688:27: ',' eventName
                                                            {
                                                                DebugLocation(688, 27);
                                                                char_literal345 = (IToken)Match(input, 97, Follow._97_in_hidingExpr3818); if (state.failed) return retval;
                                                                if (state.backtracking == 0) stream_97.Add(char_literal345);

                                                                DebugLocation(688, 31);
                                                                PushFollow(Follow._eventName_in_hidingExpr3820);
                                                                eventName346 = eventName();
                                                                PopFollow();
                                                                if (state.failed) return retval;
                                                                if (state.backtracking == 0) stream_eventName.Add(eventName346.Tree);

                                                            }
                                                            break;

                                                        default:
                                                            goto loop105;
                                                    }
                                                }

                                            loop105:
                                                ;

                                            }
                                            finally { DebugExitSubRule(105); }

                                            DebugLocation(688, 44);
                                            char_literal347 = (IToken)Match(input, 100, Follow._100_in_hidingExpr3825); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_100.Add(char_literal347);


                                        }



                                        {
                                            // AST REWRITE
                                            // elements: eventName, sequentialExpr
                                            // token labels: 
                                            // rule labels: retval
                                            // token list labels: 
                                            // rule list labels: 
                                            // wildcard labels: 
                                            if (state.backtracking == 0)
                                            {
                                                retval.Tree = root_0;
                                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                root_0 = (CommonTree)adaptor.Nil();
                                                // 688:49: -> ^( HIDING_ALPHA_NODE sequentialExpr ( eventName )+ )
                                                {
                                                    DebugLocation(688, 52);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:688:52: ^( HIDING_ALPHA_NODE sequentialExpr ( eventName )+ )
                                                    {
                                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                        DebugLocation(688, 54);
                                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(HIDING_ALPHA_NODE, "HIDING_ALPHA_NODE"), root_1);

                                                        DebugLocation(688, 72);
                                                        adaptor.AddChild(root_1, stream_sequentialExpr.NextTree());
                                                        DebugLocation(688, 87);
                                                        if (!(stream_eventName.HasNext))
                                                        {
                                                            throw new RewriteEarlyExitException();
                                                        }
                                                        while (stream_eventName.HasNext)
                                                        {
                                                            DebugLocation(688, 87);
                                                            adaptor.AddChild(root_1, stream_eventName.NextTree());

                                                        }
                                                        stream_eventName.Reset();

                                                        adaptor.AddChild(root_0, root_1);
                                                    }

                                                }

                                                retval.Tree = root_0;
                                            }
                                        }

                                    }
                                    break;
                                case 2:
                                    DebugEnterAlt(2);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:689:7: 
                                    {

                                        {
                                            // AST REWRITE
                                            // elements: sequentialExpr
                                            // token labels: 
                                            // rule labels: retval
                                            // token list labels: 
                                            // rule list labels: 
                                            // wildcard labels: 
                                            if (state.backtracking == 0)
                                            {
                                                retval.Tree = root_0;
                                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                                root_0 = (CommonTree)adaptor.Nil();
                                                // 689:7: -> sequentialExpr
                                                {
                                                    DebugLocation(689, 10);
                                                    adaptor.AddChild(root_0, stream_sequentialExpr.NextTree());

                                                }

                                                retval.Tree = root_0;
                                            }
                                        }

                                    }
                                    break;

                            }
                        }
                        finally { DebugExitSubRule(106); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("hidingExpr", 44);
                    LeaveRule("hidingExpr", 44);
                    Leave_hidingExpr();
                    if (state.backtracking > 0) { Memoize(input, 44, hidingExpr_StartIndex); }
                }
                DebugLocation(691, 1);
            }
            finally { DebugExitRule(GrammarFileName, "hidingExpr"); }
            return retval;

        }
        // $ANTLR end "hidingExpr"

        public class sequentialExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_sequentialExpr();
        partial void Leave_sequentialExpr();

        // $ANTLR start "sequentialExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:705:1: sequentialExpr : guardExpr ( ';' guardExpr )* ;
        [GrammarRule("sequentialExpr")]
        private PNTreeParser.sequentialExpr_return sequentialExpr()
        {
            Enter_sequentialExpr();
            EnterRule("sequentialExpr", 45);
            TraceIn("sequentialExpr", 45);
            PNTreeParser.sequentialExpr_return retval = new PNTreeParser.sequentialExpr_return();
            retval.Start = (IToken)input.LT(1);
            int sequentialExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal349 = null;
            PNTreeParser.guardExpr_return guardExpr348 = default(PNTreeParser.guardExpr_return);
            PNTreeParser.guardExpr_return guardExpr350 = default(PNTreeParser.guardExpr_return);

            CommonTree char_literal349_tree = null;

            paraphrases.Push("in sequential process");
            try
            {
                DebugEnterRule(GrammarFileName, "sequentialExpr");
                DebugLocation(705, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 45)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:708:2: ( guardExpr ( ';' guardExpr )* )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:708:4: guardExpr ( ';' guardExpr )*
                    {
                        root_0 = (CommonTree)adaptor.Nil();

                        DebugLocation(708, 4);
                        PushFollow(Follow._guardExpr_in_sequentialExpr3876);
                        guardExpr348 = guardExpr();
                        PopFollow();
                        if (state.failed) return retval;
                        if (state.backtracking == 0) adaptor.AddChild(root_0, guardExpr348.Tree);
                        DebugLocation(708, 14);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:708:14: ( ';' guardExpr )*
                        try
                        {
                            DebugEnterSubRule(107);
                            while (true)
                            {
                                int alt107 = 2;
                                try
                                {
                                    DebugEnterDecision(107, decisionCanBacktrack[107]);
                                    try
                                    {
                                        alt107 = dfa107.Predict(input);
                                    }
                                    catch (NoViableAltException nvae)
                                    {
                                        DebugRecognitionException(nvae);
                                        throw;
                                    }
                                }
                                finally { DebugExitDecision(107); }
                                switch (alt107)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:708:15: ';' guardExpr
                                        {
                                            DebugLocation(708, 18);
                                            char_literal349 = (IToken)Match(input, 68, Follow._68_in_sequentialExpr3879); if (state.failed) return retval;
                                            if (state.backtracking == 0)
                                            {
                                                char_literal349_tree = (CommonTree)adaptor.Create(char_literal349);
                                                root_0 = (CommonTree)adaptor.BecomeRoot(char_literal349_tree, root_0);
                                            }
                                            DebugLocation(708, 20);
                                            PushFollow(Follow._guardExpr_in_sequentialExpr3882);
                                            guardExpr350 = guardExpr();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) adaptor.AddChild(root_0, guardExpr350.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop107;
                                }
                            }

                        loop107:
                            ;

                        }
                        finally { DebugExitSubRule(107); }


                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("sequentialExpr", 45);
                    LeaveRule("sequentialExpr", 45);
                    Leave_sequentialExpr();
                    if (state.backtracking > 0) { Memoize(input, 45, sequentialExpr_StartIndex); }
                }
                DebugLocation(709, 1);
            }
            finally { DebugExitRule(GrammarFileName, "sequentialExpr"); }
            return retval;

        }
        // $ANTLR end "sequentialExpr"

        public class guardExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_guardExpr();
        partial void Leave_guardExpr();

        // $ANTLR start "guardExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:711:1: guardExpr : ( channelExpr | '[' conditionalOrExpression ']' channelExpr -> ^( GUARD_NODE conditionalOrExpression channelExpr ) );
        [GrammarRule("guardExpr")]
        private PNTreeParser.guardExpr_return guardExpr()
        {
            Enter_guardExpr();
            EnterRule("guardExpr", 46);
            TraceIn("guardExpr", 46);
            PNTreeParser.guardExpr_return retval = new PNTreeParser.guardExpr_return();
            retval.Start = (IToken)input.LT(1);
            int guardExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal352 = null;
            IToken char_literal354 = null;
            PNTreeParser.channelExpr_return channelExpr351 = default(PNTreeParser.channelExpr_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression353 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.channelExpr_return channelExpr355 = default(PNTreeParser.channelExpr_return);

            CommonTree char_literal352_tree = null;
            CommonTree char_literal354_tree = null;
            RewriteRuleITokenStream stream_109 = new RewriteRuleITokenStream(adaptor, "token 109");
            RewriteRuleITokenStream stream_108 = new RewriteRuleITokenStream(adaptor, "token 108");
            RewriteRuleSubtreeStream stream_channelExpr = new RewriteRuleSubtreeStream(adaptor, "rule channelExpr");
            RewriteRuleSubtreeStream stream_conditionalOrExpression = new RewriteRuleSubtreeStream(adaptor, "rule conditionalOrExpression");
            paraphrases.Push("in guard process");
            try
            {
                DebugEnterRule(GrammarFileName, "guardExpr");
                DebugLocation(711, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 46)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:714:2: ( channelExpr | '[' conditionalOrExpression ']' channelExpr -> ^( GUARD_NODE conditionalOrExpression channelExpr ) )
                    int alt108 = 2;
                    try
                    {
                        DebugEnterDecision(108, decisionCanBacktrack[108]);
                        int LA108_0 = input.LA(1);

                        if ((LA108_0 == ID || LA108_0 == 70 || LA108_0 == 72 || LA108_0 == 80 || LA108_0 == 99 || LA108_0 == 131 || LA108_0 == 144 || (LA108_0 >= 146 && LA108_0 <= 150)))
                        {
                            alt108 = 1;
                        }
                        else if ((LA108_0 == 108))
                        {
                            alt108 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 108, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(108); }
                    switch (alt108)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:714:4: channelExpr
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(714, 4);
                                PushFollow(Follow._channelExpr_in_guardExpr3907);
                                channelExpr351 = channelExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, channelExpr351.Tree);

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:715:4: '[' conditionalOrExpression ']' channelExpr
                            {
                                DebugLocation(715, 4);
                                char_literal352 = (IToken)Match(input, 108, Follow._108_in_guardExpr3912); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_108.Add(char_literal352);

                                DebugLocation(715, 8);
                                PushFollow(Follow._conditionalOrExpression_in_guardExpr3914);
                                conditionalOrExpression353 = conditionalOrExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression353.Tree);
                                DebugLocation(715, 32);
                                char_literal354 = (IToken)Match(input, 109, Follow._109_in_guardExpr3916); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_109.Add(char_literal354);

                                DebugLocation(715, 36);
                                PushFollow(Follow._channelExpr_in_guardExpr3918);
                                channelExpr355 = channelExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_channelExpr.Add(channelExpr355.Tree);


                                {
                                    // AST REWRITE
                                    // elements: conditionalOrExpression, channelExpr
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 715:48: -> ^( GUARD_NODE conditionalOrExpression channelExpr )
                                        {
                                            DebugLocation(715, 51);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:715:51: ^( GUARD_NODE conditionalOrExpression channelExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(715, 53);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(GUARD_NODE, "GUARD_NODE"), root_1);

                                                DebugLocation(715, 64);
                                                adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());
                                                DebugLocation(715, 88);
                                                adaptor.AddChild(root_1, stream_channelExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("guardExpr", 46);
                    LeaveRule("guardExpr", 46);
                    Leave_guardExpr();
                    if (state.backtracking > 0) { Memoize(input, 46, guardExpr_StartIndex); }
                }
                DebugLocation(716, 1);
            }
            finally { DebugExitRule(GrammarFileName, "guardExpr"); }
            return retval;

        }
        // $ANTLR end "guardExpr"

        public class channelExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_channelExpr();
        partial void Leave_channelExpr();

        // $ANTLR start "channelExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:718:1: channelExpr : (name= ID '!' expression ( '.' expression )* '->' channelExpr -> ^( CHANNEL_OUT_NODE $name channelExpr ( expression )+ ) | name= ID '?' ( '[' guard= conditionalOrExpression ']' )? expression ( '.' expression )* '->' channelExpr -> ^( CHANNEL_IN_NODE $name ( expression )+ channelExpr ( $guard)? ) | eventExpr );
        [GrammarRule("channelExpr")]
        private PNTreeParser.channelExpr_return channelExpr()
        {
            Enter_channelExpr();
            EnterRule("channelExpr", 47);
            TraceIn("channelExpr", 47);
            PNTreeParser.channelExpr_return retval = new PNTreeParser.channelExpr_return();
            retval.Start = (IToken)input.LT(1);
            int channelExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken name = null;
            IToken char_literal356 = null;
            IToken char_literal358 = null;
            IToken string_literal360 = null;
            IToken char_literal362 = null;
            IToken char_literal363 = null;
            IToken char_literal364 = null;
            IToken char_literal366 = null;
            IToken string_literal368 = null;
            PNTreeParser.conditionalOrExpression_return guard = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.expression_return expression357 = default(PNTreeParser.expression_return);
            PNTreeParser.expression_return expression359 = default(PNTreeParser.expression_return);
            PNTreeParser.channelExpr_return channelExpr361 = default(PNTreeParser.channelExpr_return);
            PNTreeParser.expression_return expression365 = default(PNTreeParser.expression_return);
            PNTreeParser.expression_return expression367 = default(PNTreeParser.expression_return);
            PNTreeParser.channelExpr_return channelExpr369 = default(PNTreeParser.channelExpr_return);
            PNTreeParser.eventExpr_return eventExpr370 = default(PNTreeParser.eventExpr_return);

            CommonTree name_tree = null;
            CommonTree char_literal356_tree = null;
            CommonTree char_literal358_tree = null;
            CommonTree string_literal360_tree = null;
            CommonTree char_literal362_tree = null;
            CommonTree char_literal363_tree = null;
            CommonTree char_literal364_tree = null;
            CommonTree char_literal366_tree = null;
            CommonTree string_literal368_tree = null;
            RewriteRuleITokenStream stream_77 = new RewriteRuleITokenStream(adaptor, "token 77");
            RewriteRuleITokenStream stream_109 = new RewriteRuleITokenStream(adaptor, "token 109");
            RewriteRuleITokenStream stream_108 = new RewriteRuleITokenStream(adaptor, "token 108");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_81 = new RewriteRuleITokenStream(adaptor, "token 81");
            RewriteRuleITokenStream stream_85 = new RewriteRuleITokenStream(adaptor, "token 85");
            RewriteRuleITokenStream stream_76 = new RewriteRuleITokenStream(adaptor, "token 76");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            RewriteRuleSubtreeStream stream_channelExpr = new RewriteRuleSubtreeStream(adaptor, "rule channelExpr");
            RewriteRuleSubtreeStream stream_conditionalOrExpression = new RewriteRuleSubtreeStream(adaptor, "rule conditionalOrExpression");
            paraphrases.Push("in channel output/input process");
            try
            {
                DebugEnterRule(GrammarFileName, "channelExpr");
                DebugLocation(718, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 47)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:721:2: (name= ID '!' expression ( '.' expression )* '->' channelExpr -> ^( CHANNEL_OUT_NODE $name channelExpr ( expression )+ ) | name= ID '?' ( '[' guard= conditionalOrExpression ']' )? expression ( '.' expression )* '->' channelExpr -> ^( CHANNEL_IN_NODE $name ( expression )+ channelExpr ( $guard)? ) | eventExpr )
                    int alt112 = 3;
                    try
                    {
                        DebugEnterDecision(112, decisionCanBacktrack[112]);
                        try
                        {
                            alt112 = dfa112.Predict(input);
                        }
                        catch (NoViableAltException nvae)
                        {
                            DebugRecognitionException(nvae);
                            throw;
                        }
                    }
                    finally { DebugExitDecision(112); }
                    switch (alt112)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:723:4: name= ID '!' expression ( '.' expression )* '->' channelExpr
                            {
                                DebugLocation(723, 8);
                                name = (IToken)Match(input, ID, Follow._ID_in_channelExpr3958); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(name);

                                DebugLocation(723, 12);
                                char_literal356 = (IToken)Match(input, 76, Follow._76_in_channelExpr3960); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_76.Add(char_literal356);

                                DebugLocation(723, 16);
                                PushFollow(Follow._expression_in_channelExpr3962);
                                expression357 = expression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_expression.Add(expression357.Tree);
                                DebugLocation(723, 27);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:723:27: ( '.' expression )*
                                try
                                {
                                    DebugEnterSubRule(109);
                                    while (true)
                                    {
                                        int alt109 = 2;
                                        try
                                        {
                                            DebugEnterDecision(109, decisionCanBacktrack[109]);
                                            int LA109_0 = input.LA(1);

                                            if ((LA109_0 == 85))
                                            {
                                                alt109 = 1;
                                            }


                                        }
                                        finally { DebugExitDecision(109); }
                                        switch (alt109)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:723:28: '.' expression
                                                {
                                                    DebugLocation(723, 28);
                                                    char_literal358 = (IToken)Match(input, 85, Follow._85_in_channelExpr3965); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_85.Add(char_literal358);

                                                    DebugLocation(723, 32);
                                                    PushFollow(Follow._expression_in_channelExpr3967);
                                                    expression359 = expression();
                                                    PopFollow();
                                                    if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_expression.Add(expression359.Tree);

                                                }
                                                break;

                                            default:
                                                goto loop109;
                                        }
                                    }

                                loop109:
                                    ;

                                }
                                finally { DebugExitSubRule(109); }

                                DebugLocation(723, 45);
                                string_literal360 = (IToken)Match(input, 81, Follow._81_in_channelExpr3971); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_81.Add(string_literal360);

                                DebugLocation(723, 50);
                                PushFollow(Follow._channelExpr_in_channelExpr3973);
                                channelExpr361 = channelExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_channelExpr.Add(channelExpr361.Tree);


                                {
                                    // AST REWRITE
                                    // elements: expression, name, channelExpr
                                    // token labels: name
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_name = new RewriteRuleITokenStream(adaptor, "token name", name);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 723:62: -> ^( CHANNEL_OUT_NODE $name channelExpr ( expression )+ )
                                        {
                                            DebugLocation(723, 65);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:723:65: ^( CHANNEL_OUT_NODE $name channelExpr ( expression )+ )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(723, 67);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CHANNEL_OUT_NODE, "CHANNEL_OUT_NODE"), root_1);

                                                DebugLocation(723, 84);
                                                adaptor.AddChild(root_1, stream_name.NextNode());
                                                DebugLocation(723, 90);
                                                adaptor.AddChild(root_1, stream_channelExpr.NextTree());
                                                DebugLocation(723, 102);
                                                if (!(stream_expression.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_expression.HasNext)
                                                {
                                                    DebugLocation(723, 102);
                                                    adaptor.AddChild(root_1, stream_expression.NextTree());

                                                }
                                                stream_expression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:4: name= ID '?' ( '[' guard= conditionalOrExpression ']' )? expression ( '.' expression )* '->' channelExpr
                            {
                                DebugLocation(724, 8);
                                name = (IToken)Match(input, ID, Follow._ID_in_channelExpr3994); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(name);

                                DebugLocation(724, 12);
                                char_literal362 = (IToken)Match(input, 77, Follow._77_in_channelExpr3996); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_77.Add(char_literal362);

                                DebugLocation(724, 16);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:16: ( '[' guard= conditionalOrExpression ']' )?
                                int alt110 = 2;
                                try
                                {
                                    DebugEnterSubRule(110);
                                    try
                                    {
                                        DebugEnterDecision(110, decisionCanBacktrack[110]);
                                        int LA110_0 = input.LA(1);

                                        if ((LA110_0 == 108))
                                        {
                                            alt110 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(110); }
                                    switch (alt110)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:17: '[' guard= conditionalOrExpression ']'
                                            {
                                                DebugLocation(724, 17);
                                                char_literal363 = (IToken)Match(input, 108, Follow._108_in_channelExpr3999); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_108.Add(char_literal363);

                                                DebugLocation(724, 26);
                                                PushFollow(Follow._conditionalOrExpression_in_channelExpr4003);
                                                guard = conditionalOrExpression();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(guard.Tree);
                                                DebugLocation(724, 51);
                                                char_literal364 = (IToken)Match(input, 109, Follow._109_in_channelExpr4005); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_109.Add(char_literal364);


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(110); }

                                DebugLocation(724, 57);
                                PushFollow(Follow._expression_in_channelExpr4009);
                                expression365 = expression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_expression.Add(expression365.Tree);
                                DebugLocation(724, 68);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:68: ( '.' expression )*
                                try
                                {
                                    DebugEnterSubRule(111);
                                    while (true)
                                    {
                                        int alt111 = 2;
                                        try
                                        {
                                            DebugEnterDecision(111, decisionCanBacktrack[111]);
                                            int LA111_0 = input.LA(1);

                                            if ((LA111_0 == 85))
                                            {
                                                alt111 = 1;
                                            }


                                        }
                                        finally { DebugExitDecision(111); }
                                        switch (alt111)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:69: '.' expression
                                                {
                                                    DebugLocation(724, 69);
                                                    char_literal366 = (IToken)Match(input, 85, Follow._85_in_channelExpr4012); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_85.Add(char_literal366);

                                                    DebugLocation(724, 73);
                                                    PushFollow(Follow._expression_in_channelExpr4014);
                                                    expression367 = expression();
                                                    PopFollow();
                                                    if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_expression.Add(expression367.Tree);

                                                }
                                                break;

                                            default:
                                                goto loop111;
                                        }
                                    }

                                loop111:
                                    ;

                                }
                                finally { DebugExitSubRule(111); }

                                DebugLocation(724, 87);
                                string_literal368 = (IToken)Match(input, 81, Follow._81_in_channelExpr4019); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_81.Add(string_literal368);

                                DebugLocation(724, 92);
                                PushFollow(Follow._channelExpr_in_channelExpr4021);
                                channelExpr369 = channelExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_channelExpr.Add(channelExpr369.Tree);


                                {
                                    // AST REWRITE
                                    // elements: expression, name, guard, channelExpr
                                    // token labels: name
                                    // rule labels: retval, guard
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleITokenStream stream_name = new RewriteRuleITokenStream(adaptor, "token name", name);
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                        RewriteRuleSubtreeStream stream_guard = new RewriteRuleSubtreeStream(adaptor, "rule guard", guard != null ? guard.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 724:105: -> ^( CHANNEL_IN_NODE $name ( expression )+ channelExpr ( $guard)? )
                                        {
                                            DebugLocation(724, 108);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:108: ^( CHANNEL_IN_NODE $name ( expression )+ channelExpr ( $guard)? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(724, 110);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CHANNEL_IN_NODE, "CHANNEL_IN_NODE"), root_1);

                                                DebugLocation(724, 126);
                                                adaptor.AddChild(root_1, stream_name.NextNode());
                                                DebugLocation(724, 132);
                                                if (!(stream_expression.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_expression.HasNext)
                                                {
                                                    DebugLocation(724, 132);
                                                    adaptor.AddChild(root_1, stream_expression.NextTree());

                                                }
                                                stream_expression.Reset();
                                                DebugLocation(724, 144);
                                                adaptor.AddChild(root_1, stream_channelExpr.NextTree());
                                                DebugLocation(724, 156);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:156: ( $guard)?
                                                if (stream_guard.HasNext)
                                                {
                                                    DebugLocation(724, 156);
                                                    adaptor.AddChild(root_1, stream_guard.NextTree());

                                                }
                                                stream_guard.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:725:4: eventExpr
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(725, 4);
                                PushFollow(Follow._eventExpr_in_channelExpr4045);
                                eventExpr370 = eventExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, eventExpr370.Tree);

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("channelExpr", 47);
                    LeaveRule("channelExpr", 47);
                    Leave_channelExpr();
                    if (state.backtracking > 0) { Memoize(input, 47, channelExpr_StartIndex); }
                }
                DebugLocation(726, 1);
            }
            finally { DebugExitRule(GrammarFileName, "channelExpr"); }
            return retval;

        }
        // $ANTLR end "channelExpr"

        public class eventExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_eventExpr();
        partial void Leave_eventExpr();

        // $ANTLR start "eventExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:728:1: eventExpr : ( eventM ( block )? '->' channelExpr -> ^( EVENT_NODE eventM channelExpr ( block )? ) | block '->' channelExpr -> ^( EVENT_NODE channelExpr block ) | '(' eventM ( ',' eventM )* ')' '->' channelExpr -> ^( '[]' ( ^( EVENT_NODE eventM channelExpr ) )+ ) | caseExpr );
        [GrammarRule("eventExpr")]
        private PNTreeParser.eventExpr_return eventExpr()
        {
            Enter_eventExpr();
            EnterRule("eventExpr", 48);
            TraceIn("eventExpr", 48);
            PNTreeParser.eventExpr_return retval = new PNTreeParser.eventExpr_return();
            retval.Start = (IToken)input.LT(1);
            int eventExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal373 = null;
            IToken string_literal376 = null;
            IToken char_literal378 = null;
            IToken char_literal380 = null;
            IToken char_literal382 = null;
            IToken string_literal383 = null;
            PNTreeParser.eventM_return eventM371 = default(PNTreeParser.eventM_return);
            PNTreeParser.block_return block372 = default(PNTreeParser.block_return);
            PNTreeParser.channelExpr_return channelExpr374 = default(PNTreeParser.channelExpr_return);
            PNTreeParser.block_return block375 = default(PNTreeParser.block_return);
            PNTreeParser.channelExpr_return channelExpr377 = default(PNTreeParser.channelExpr_return);
            PNTreeParser.eventM_return eventM379 = default(PNTreeParser.eventM_return);
            PNTreeParser.eventM_return eventM381 = default(PNTreeParser.eventM_return);
            PNTreeParser.channelExpr_return channelExpr384 = default(PNTreeParser.channelExpr_return);
            PNTreeParser.caseExpr_return caseExpr385 = default(PNTreeParser.caseExpr_return);

            CommonTree string_literal373_tree = null;
            CommonTree string_literal376_tree = null;
            CommonTree char_literal378_tree = null;
            CommonTree char_literal380_tree = null;
            CommonTree char_literal382_tree = null;
            CommonTree string_literal383_tree = null;
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_81 = new RewriteRuleITokenStream(adaptor, "token 81");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");
            RewriteRuleSubtreeStream stream_eventM = new RewriteRuleSubtreeStream(adaptor, "rule eventM");
            RewriteRuleSubtreeStream stream_channelExpr = new RewriteRuleSubtreeStream(adaptor, "rule channelExpr");
            RewriteRuleSubtreeStream stream_block = new RewriteRuleSubtreeStream(adaptor, "rule block");
            paraphrases.Push("in event definition");
            try
            {
                DebugEnterRule(GrammarFileName, "eventExpr");
                DebugLocation(728, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 48)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:2: ( eventM ( block )? '->' channelExpr -> ^( EVENT_NODE eventM channelExpr ( block )? ) | block '->' channelExpr -> ^( EVENT_NODE channelExpr block ) | '(' eventM ( ',' eventM )* ')' '->' channelExpr -> ^( '[]' ( ^( EVENT_NODE eventM channelExpr ) )+ ) | caseExpr )
                    int alt115 = 4;
                    try
                    {
                        DebugEnterDecision(115, decisionCanBacktrack[115]);
                        try
                        {
                            alt115 = dfa115.Predict(input);
                        }
                        catch (NoViableAltException nvae)
                        {
                            DebugRecognitionException(nvae);
                            throw;
                        }
                    }
                    finally { DebugExitDecision(115); }
                    switch (alt115)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:4: eventM ( block )? '->' channelExpr
                            {
                                DebugLocation(731, 4);
                                PushFollow(Follow._eventM_in_eventExpr4067);
                                eventM371 = eventM();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_eventM.Add(eventM371.Tree);
                                DebugLocation(731, 11);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:11: ( block )?
                                int alt113 = 2;
                                try
                                {
                                    DebugEnterSubRule(113);
                                    try
                                    {
                                        DebugEnterDecision(113, decisionCanBacktrack[113]);
                                        int LA113_0 = input.LA(1);

                                        if ((LA113_0 == 99))
                                        {
                                            alt113 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(113); }
                                    switch (alt113)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:12: block
                                            {
                                                DebugLocation(731, 12);
                                                PushFollow(Follow._block_in_eventExpr4070);
                                                block372 = block();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_block.Add(block372.Tree);

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(113); }

                                DebugLocation(731, 20);
                                string_literal373 = (IToken)Match(input, 81, Follow._81_in_eventExpr4074); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_81.Add(string_literal373);

                                DebugLocation(731, 25);
                                PushFollow(Follow._channelExpr_in_eventExpr4076);
                                channelExpr374 = channelExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_channelExpr.Add(channelExpr374.Tree);


                                {
                                    // AST REWRITE
                                    // elements: block, eventM, channelExpr
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 731:37: -> ^( EVENT_NODE eventM channelExpr ( block )? )
                                        {
                                            DebugLocation(731, 40);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:40: ^( EVENT_NODE eventM channelExpr ( block )? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(731, 42);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(EVENT_NODE, "EVENT_NODE"), root_1);

                                                DebugLocation(731, 53);
                                                adaptor.AddChild(root_1, stream_eventM.NextTree());
                                                DebugLocation(731, 60);
                                                adaptor.AddChild(root_1, stream_channelExpr.NextTree());
                                                DebugLocation(731, 72);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:72: ( block )?
                                                if (stream_block.HasNext)
                                                {
                                                    DebugLocation(731, 72);
                                                    adaptor.AddChild(root_1, stream_block.NextTree());

                                                }
                                                stream_block.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:732:4: block '->' channelExpr
                            {
                                DebugLocation(732, 4);
                                PushFollow(Follow._block_in_eventExpr4095);
                                block375 = block();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_block.Add(block375.Tree);
                                DebugLocation(732, 10);
                                string_literal376 = (IToken)Match(input, 81, Follow._81_in_eventExpr4097); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_81.Add(string_literal376);

                                DebugLocation(732, 15);
                                PushFollow(Follow._channelExpr_in_eventExpr4099);
                                channelExpr377 = channelExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_channelExpr.Add(channelExpr377.Tree);


                                {
                                    // AST REWRITE
                                    // elements: channelExpr, block
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 732:27: -> ^( EVENT_NODE channelExpr block )
                                        {
                                            DebugLocation(732, 30);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:732:30: ^( EVENT_NODE channelExpr block )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(732, 32);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(EVENT_NODE, "EVENT_NODE"), root_1);

                                                DebugLocation(732, 43);
                                                adaptor.AddChild(root_1, stream_channelExpr.NextTree());
                                                DebugLocation(732, 55);
                                                adaptor.AddChild(root_1, stream_block.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:733:4: '(' eventM ( ',' eventM )* ')' '->' channelExpr
                            {
                                DebugLocation(733, 4);
                                char_literal378 = (IToken)Match(input, 72, Follow._72_in_eventExpr4114); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal378);

                                DebugLocation(733, 8);
                                PushFollow(Follow._eventM_in_eventExpr4116);
                                eventM379 = eventM();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_eventM.Add(eventM379.Tree);
                                DebugLocation(733, 15);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:733:15: ( ',' eventM )*
                                try
                                {
                                    DebugEnterSubRule(114);
                                    while (true)
                                    {
                                        int alt114 = 2;
                                        try
                                        {
                                            DebugEnterDecision(114, decisionCanBacktrack[114]);
                                            int LA114_0 = input.LA(1);

                                            if ((LA114_0 == 97))
                                            {
                                                alt114 = 1;
                                            }


                                        }
                                        finally { DebugExitDecision(114); }
                                        switch (alt114)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:733:16: ',' eventM
                                                {
                                                    DebugLocation(733, 16);
                                                    char_literal380 = (IToken)Match(input, 97, Follow._97_in_eventExpr4119); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_97.Add(char_literal380);

                                                    DebugLocation(733, 20);
                                                    PushFollow(Follow._eventM_in_eventExpr4121);
                                                    eventM381 = eventM();
                                                    PopFollow();
                                                    if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_eventM.Add(eventM381.Tree);

                                                }
                                                break;

                                            default:
                                                goto loop114;
                                        }
                                    }

                                loop114:
                                    ;

                                }
                                finally { DebugExitSubRule(114); }

                                DebugLocation(733, 29);
                                char_literal382 = (IToken)Match(input, 73, Follow._73_in_eventExpr4125); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal382);

                                DebugLocation(733, 33);
                                string_literal383 = (IToken)Match(input, 81, Follow._81_in_eventExpr4127); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_81.Add(string_literal383);

                                DebugLocation(733, 38);
                                PushFollow(Follow._channelExpr_in_eventExpr4129);
                                channelExpr384 = channelExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_channelExpr.Add(channelExpr384.Tree);


                                {
                                    // AST REWRITE
                                    // elements: channelExpr, 74, eventM
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 733:50: -> ^( '[]' ( ^( EVENT_NODE eventM channelExpr ) )+ )
                                        {
                                            DebugLocation(733, 54);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:733:54: ^( '[]' ( ^( EVENT_NODE eventM channelExpr ) )+ )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(733, 56);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(74, "74"), root_1);

                                                DebugLocation(733, 61);
                                                if (!(stream_channelExpr.HasNext || stream_eventM.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_channelExpr.HasNext || stream_eventM.HasNext)
                                                {
                                                    DebugLocation(733, 61);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:733:61: ^( EVENT_NODE eventM channelExpr )
                                                    {
                                                        CommonTree root_2 = (CommonTree)adaptor.Nil();
                                                        DebugLocation(733, 63);
                                                        root_2 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(EVENT_NODE, "EVENT_NODE"), root_2);

                                                        DebugLocation(733, 74);
                                                        adaptor.AddChild(root_2, stream_eventM.NextTree());
                                                        DebugLocation(733, 81);
                                                        adaptor.AddChild(root_2, stream_channelExpr.NextTree());

                                                        adaptor.AddChild(root_1, root_2);
                                                    }

                                                }
                                                stream_channelExpr.Reset();
                                                stream_eventM.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 4:
                            DebugEnterAlt(4);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:734:4: caseExpr
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(734, 4);
                                PushFollow(Follow._caseExpr_in_eventExpr4151);
                                caseExpr385 = caseExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, caseExpr385.Tree);

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("eventExpr", 48);
                    LeaveRule("eventExpr", 48);
                    Leave_eventExpr();
                    if (state.backtracking > 0) { Memoize(input, 48, eventExpr_StartIndex); }
                }
                DebugLocation(735, 1);
            }
            finally { DebugExitRule(GrammarFileName, "eventExpr"); }
            return retval;

        }
        // $ANTLR end "eventExpr"

        public class caseExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_caseExpr();
        partial void Leave_caseExpr();

        // $ANTLR start "caseExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:737:1: caseExpr : ( 'case' ( '{' ( caseCondition )+ ( 'default' ':' elsec= interleaveExpr )? '}' ) -> ^( CASE_PROCESS_NODE ( caseCondition )+ ( $elsec)? ) | ifExpr );
        [GrammarRule("caseExpr")]
        private PNTreeParser.caseExpr_return caseExpr()
        {
            Enter_caseExpr();
            EnterRule("caseExpr", 49);
            TraceIn("caseExpr", 49);
            PNTreeParser.caseExpr_return retval = new PNTreeParser.caseExpr_return();
            retval.Start = (IToken)input.LT(1);
            int caseExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal386 = null;
            IToken char_literal387 = null;
            IToken string_literal389 = null;
            IToken char_literal390 = null;
            IToken char_literal391 = null;
            PNTreeParser.interleaveExpr_return elsec = default(PNTreeParser.interleaveExpr_return);
            PNTreeParser.caseCondition_return caseCondition388 = default(PNTreeParser.caseCondition_return);
            PNTreeParser.ifExpr_return ifExpr392 = default(PNTreeParser.ifExpr_return);

            CommonTree string_literal386_tree = null;
            CommonTree char_literal387_tree = null;
            CommonTree string_literal389_tree = null;
            CommonTree char_literal390_tree = null;
            CommonTree char_literal391_tree = null;
            RewriteRuleITokenStream stream_144 = new RewriteRuleITokenStream(adaptor, "token 144");
            RewriteRuleITokenStream stream_145 = new RewriteRuleITokenStream(adaptor, "token 145");
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_129 = new RewriteRuleITokenStream(adaptor, "token 129");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_caseCondition = new RewriteRuleSubtreeStream(adaptor, "rule caseCondition");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            paraphrases.Push("in case process");
            try
            {
                DebugEnterRule(GrammarFileName, "caseExpr");
                DebugLocation(737, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 49)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:740:2: ( 'case' ( '{' ( caseCondition )+ ( 'default' ':' elsec= interleaveExpr )? '}' ) -> ^( CASE_PROCESS_NODE ( caseCondition )+ ( $elsec)? ) | ifExpr )
                    int alt118 = 2;
                    try
                    {
                        DebugEnterDecision(118, decisionCanBacktrack[118]);
                        int LA118_0 = input.LA(1);

                        if ((LA118_0 == 144))
                        {
                            alt118 = 1;
                        }
                        else if ((LA118_0 == ID || LA118_0 == 70 || LA118_0 == 72 || LA118_0 == 131 || (LA118_0 >= 146 && LA118_0 <= 150)))
                        {
                            alt118 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 118, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(118); }
                    switch (alt118)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:740:4: 'case' ( '{' ( caseCondition )+ ( 'default' ':' elsec= interleaveExpr )? '}' )
                            {
                                DebugLocation(740, 4);
                                string_literal386 = (IToken)Match(input, 144, Follow._144_in_caseExpr4173); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_144.Add(string_literal386);

                                DebugLocation(741, 4);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:741:4: ( '{' ( caseCondition )+ ( 'default' ':' elsec= interleaveExpr )? '}' )
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:742:4: '{' ( caseCondition )+ ( 'default' ':' elsec= interleaveExpr )? '}'
                                {
                                    DebugLocation(742, 4);
                                    char_literal387 = (IToken)Match(input, 99, Follow._99_in_caseExpr4183); if (state.failed) return retval;
                                    if (state.backtracking == 0) stream_99.Add(char_literal387);

                                    DebugLocation(743, 3);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:743:3: ( caseCondition )+
                                    int cnt116 = 0;
                                    try
                                    {
                                        DebugEnterSubRule(116);
                                        while (true)
                                        {
                                            int alt116 = 2;
                                            try
                                            {
                                                DebugEnterDecision(116, decisionCanBacktrack[116]);
                                                int LA116_0 = input.LA(1);

                                                if (((LA116_0 >= ID && LA116_0 <= INT) || LA116_0 == 72 || LA116_0 == 76 || (LA116_0 >= 102 && LA116_0 <= 104) || LA116_0 == 120 || (LA116_0 >= 126 && LA116_0 <= 127)))
                                                {
                                                    alt116 = 1;
                                                }


                                            }
                                            finally { DebugExitDecision(116); }
                                            switch (alt116)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: caseCondition
                                                    {
                                                        DebugLocation(743, 3);
                                                        PushFollow(Follow._caseCondition_in_caseExpr4188);
                                                        caseCondition388 = caseCondition();
                                                        PopFollow();
                                                        if (state.failed) return retval;
                                                        if (state.backtracking == 0) stream_caseCondition.Add(caseCondition388.Tree);

                                                    }
                                                    break;

                                                default:
                                                    if (cnt116 >= 1)
                                                        goto loop116;

                                                    if (state.backtracking > 0) { state.failed = true; return retval; }
                                                    EarlyExitException eee116 = new EarlyExitException(116, input);
                                                    DebugRecognitionException(eee116);
                                                    throw eee116;
                                            }
                                            cnt116++;
                                        }
                                    loop116:
                                        ;

                                    }
                                    finally { DebugExitSubRule(116); }

                                    DebugLocation(744, 3);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:744:3: ( 'default' ':' elsec= interleaveExpr )?
                                    int alt117 = 2;
                                    try
                                    {
                                        DebugEnterSubRule(117);
                                        try
                                        {
                                            DebugEnterDecision(117, decisionCanBacktrack[117]);
                                            int LA117_0 = input.LA(1);

                                            if ((LA117_0 == 145))
                                            {
                                                alt117 = 1;
                                            }
                                        }
                                        finally { DebugExitDecision(117); }
                                        switch (alt117)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:744:4: 'default' ':' elsec= interleaveExpr
                                                {
                                                    DebugLocation(744, 4);
                                                    string_literal389 = (IToken)Match(input, 145, Follow._145_in_caseExpr4194); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_145.Add(string_literal389);

                                                    DebugLocation(744, 14);
                                                    char_literal390 = (IToken)Match(input, 129, Follow._129_in_caseExpr4196); if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_129.Add(char_literal390);

                                                    DebugLocation(744, 23);
                                                    PushFollow(Follow._interleaveExpr_in_caseExpr4200);
                                                    elsec = interleaveExpr();
                                                    PopFollow();
                                                    if (state.failed) return retval;
                                                    if (state.backtracking == 0) stream_interleaveExpr.Add(elsec.Tree);

                                                }
                                                break;

                                        }
                                    }
                                    finally { DebugExitSubRule(117); }

                                    DebugLocation(745, 5);
                                    char_literal391 = (IToken)Match(input, 100, Follow._100_in_caseExpr4208); if (state.failed) return retval;
                                    if (state.backtracking == 0) stream_100.Add(char_literal391);


                                }



                                {
                                    // AST REWRITE
                                    // elements: elsec, caseCondition
                                    // token labels: 
                                    // rule labels: retval, elsec
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                        RewriteRuleSubtreeStream stream_elsec = new RewriteRuleSubtreeStream(adaptor, "rule elsec", elsec != null ? elsec.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 747:4: -> ^( CASE_PROCESS_NODE ( caseCondition )+ ( $elsec)? )
                                        {
                                            DebugLocation(747, 7);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:747:7: ^( CASE_PROCESS_NODE ( caseCondition )+ ( $elsec)? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(747, 9);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CASE_PROCESS_NODE, "CASE_PROCESS_NODE"), root_1);

                                                DebugLocation(747, 27);
                                                if (!(stream_caseCondition.HasNext))
                                                {
                                                    throw new RewriteEarlyExitException();
                                                }
                                                while (stream_caseCondition.HasNext)
                                                {
                                                    DebugLocation(747, 27);
                                                    adaptor.AddChild(root_1, stream_caseCondition.NextTree());

                                                }
                                                stream_caseCondition.Reset();
                                                DebugLocation(747, 42);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:747:42: ( $elsec)?
                                                if (stream_elsec.HasNext)
                                                {
                                                    DebugLocation(747, 42);
                                                    adaptor.AddChild(root_1, stream_elsec.NextTree());

                                                }
                                                stream_elsec.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:748:4: ifExpr
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(748, 4);
                                PushFollow(Follow._ifExpr_in_caseExpr4238);
                                ifExpr392 = ifExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, ifExpr392.Tree);

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("caseExpr", 49);
                    LeaveRule("caseExpr", 49);
                    Leave_caseExpr();
                    if (state.backtracking > 0) { Memoize(input, 49, caseExpr_StartIndex); }
                }
                DebugLocation(749, 1);
            }
            finally { DebugExitRule(GrammarFileName, "caseExpr"); }
            return retval;

        }
        // $ANTLR end "caseExpr"

        public class caseCondition_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_caseCondition();
        partial void Leave_caseCondition();

        // $ANTLR start "caseCondition"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:752:1: caseCondition : ( conditionalOrExpression ':' interleaveExpr ) -> ^( CASE_PROCESS_CONDITION_NODE conditionalOrExpression interleaveExpr ) ;
        [GrammarRule("caseCondition")]
        private PNTreeParser.caseCondition_return caseCondition()
        {
            Enter_caseCondition();
            EnterRule("caseCondition", 50);
            TraceIn("caseCondition", 50);
            PNTreeParser.caseCondition_return retval = new PNTreeParser.caseCondition_return();
            retval.Start = (IToken)input.LT(1);
            int caseCondition_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal394 = null;
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression393 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.interleaveExpr_return interleaveExpr395 = default(PNTreeParser.interleaveExpr_return);

            CommonTree char_literal394_tree = null;
            RewriteRuleITokenStream stream_129 = new RewriteRuleITokenStream(adaptor, "token 129");
            RewriteRuleSubtreeStream stream_conditionalOrExpression = new RewriteRuleSubtreeStream(adaptor, "rule conditionalOrExpression");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            try
            {
                DebugEnterRule(GrammarFileName, "caseCondition");
                DebugLocation(752, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 50)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:752:15: ( ( conditionalOrExpression ':' interleaveExpr ) -> ^( CASE_PROCESS_CONDITION_NODE conditionalOrExpression interleaveExpr ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:753:2: ( conditionalOrExpression ':' interleaveExpr )
                    {
                        DebugLocation(753, 2);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:753:2: ( conditionalOrExpression ':' interleaveExpr )
                        DebugEnterAlt(1);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:753:3: conditionalOrExpression ':' interleaveExpr
                        {
                            DebugLocation(753, 3);
                            PushFollow(Follow._conditionalOrExpression_in_caseCondition4251);
                            conditionalOrExpression393 = conditionalOrExpression();
                            PopFollow();
                            if (state.failed) return retval;
                            if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression393.Tree);
                            DebugLocation(753, 27);
                            char_literal394 = (IToken)Match(input, 129, Follow._129_in_caseCondition4253); if (state.failed) return retval;
                            if (state.backtracking == 0) stream_129.Add(char_literal394);

                            DebugLocation(753, 31);
                            PushFollow(Follow._interleaveExpr_in_caseCondition4255);
                            interleaveExpr395 = interleaveExpr();
                            PopFollow();
                            if (state.failed) return retval;
                            if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr395.Tree);

                        }



                        {
                            // AST REWRITE
                            // elements: conditionalOrExpression, interleaveExpr
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 753:47: -> ^( CASE_PROCESS_CONDITION_NODE conditionalOrExpression interleaveExpr )
                                {
                                    DebugLocation(753, 50);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:753:50: ^( CASE_PROCESS_CONDITION_NODE conditionalOrExpression interleaveExpr )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(753, 52);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(CASE_PROCESS_CONDITION_NODE, "CASE_PROCESS_CONDITION_NODE"), root_1);

                                        DebugLocation(753, 80);
                                        adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());
                                        DebugLocation(753, 104);
                                        adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("caseCondition", 50);
                    LeaveRule("caseCondition", 50);
                    Leave_caseCondition();
                    if (state.backtracking > 0) { Memoize(input, 50, caseCondition_StartIndex); }
                }
                DebugLocation(754, 1);
            }
            finally { DebugExitRule(GrammarFileName, "caseCondition"); }
            return retval;

        }
        // $ANTLR end "caseCondition"

        public class ifExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_ifExpr();
        partial void Leave_ifExpr();

        // $ANTLR start "ifExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:756:1: ifExpr : ( atomicExpr | ifExprs );
        [GrammarRule("ifExpr")]
        private PNTreeParser.ifExpr_return ifExpr()
        {
            Enter_ifExpr();
            EnterRule("ifExpr", 51);
            TraceIn("ifExpr", 51);
            PNTreeParser.ifExpr_return retval = new PNTreeParser.ifExpr_return();
            retval.Start = (IToken)input.LT(1);
            int ifExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            PNTreeParser.atomicExpr_return atomicExpr396 = default(PNTreeParser.atomicExpr_return);
            PNTreeParser.ifExprs_return ifExprs397 = default(PNTreeParser.ifExprs_return);


            paraphrases.Push("in if process");
            try
            {
                DebugEnterRule(GrammarFileName, "ifExpr");
                DebugLocation(756, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 51)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:759:2: ( atomicExpr | ifExprs )
                    int alt119 = 2;
                    try
                    {
                        DebugEnterDecision(119, decisionCanBacktrack[119]);
                        int LA119_0 = input.LA(1);

                        if ((LA119_0 == ID || LA119_0 == 70 || LA119_0 == 72 || (LA119_0 >= 148 && LA119_0 <= 150)))
                        {
                            alt119 = 1;
                        }
                        else if ((LA119_0 == 131 || (LA119_0 >= 146 && LA119_0 <= 147)))
                        {
                            alt119 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 119, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(119); }
                    switch (alt119)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:759:4: atomicExpr
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(759, 4);
                                PushFollow(Follow._atomicExpr_in_ifExpr4288);
                                atomicExpr396 = atomicExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, atomicExpr396.Tree);

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:760:4: ifExprs
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(760, 4);
                                PushFollow(Follow._ifExprs_in_ifExpr4295);
                                ifExprs397 = ifExprs();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, ifExprs397.Tree);

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("ifExpr", 51);
                    LeaveRule("ifExpr", 51);
                    Leave_ifExpr();
                    if (state.backtracking > 0) { Memoize(input, 51, ifExpr_StartIndex); }
                }
                DebugLocation(761, 1);
            }
            finally { DebugExitRule(GrammarFileName, "ifExpr"); }
            return retval;

        }
        // $ANTLR end "ifExpr"

        public class ifExprs_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_ifExprs();
        partial void Leave_ifExprs();

        // $ANTLR start "ifExprs"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:763:1: ifExprs : ( 'if' '(' conditionalOrExpression ')' '{' p1= interleaveExpr '}' ( 'else' p2= ifBlock )? -> ^( IF_PROCESS_NODE conditionalOrExpression $p1 ( $p2)? ) | 'ifa' '(' conditionalOrExpression ')' '{' p1= interleaveExpr '}' ( 'else' p2= ifBlock )? -> ^( ATOMIC_IF_PROCESS_NODE conditionalOrExpression $p1 ( $p2)? ) | 'ifb' '(' conditionalOrExpression ')' '{' interleaveExpr '}' -> ^( BLOCKING_IF_PROCESS_NODE conditionalOrExpression interleaveExpr ) );
        [GrammarRule("ifExprs")]
        private PNTreeParser.ifExprs_return ifExprs()
        {
            Enter_ifExprs();
            EnterRule("ifExprs", 52);
            TraceIn("ifExprs", 52);
            PNTreeParser.ifExprs_return retval = new PNTreeParser.ifExprs_return();
            retval.Start = (IToken)input.LT(1);
            int ifExprs_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal398 = null;
            IToken char_literal399 = null;
            IToken char_literal401 = null;
            IToken char_literal402 = null;
            IToken char_literal403 = null;
            IToken string_literal404 = null;
            IToken string_literal405 = null;
            IToken char_literal406 = null;
            IToken char_literal408 = null;
            IToken char_literal409 = null;
            IToken char_literal410 = null;
            IToken string_literal411 = null;
            IToken string_literal412 = null;
            IToken char_literal413 = null;
            IToken char_literal415 = null;
            IToken char_literal416 = null;
            IToken char_literal418 = null;
            PNTreeParser.interleaveExpr_return p1 = default(PNTreeParser.interleaveExpr_return);
            PNTreeParser.ifBlock_return p2 = default(PNTreeParser.ifBlock_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression400 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression407 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.conditionalOrExpression_return conditionalOrExpression414 = default(PNTreeParser.conditionalOrExpression_return);
            PNTreeParser.interleaveExpr_return interleaveExpr417 = default(PNTreeParser.interleaveExpr_return);

            CommonTree string_literal398_tree = null;
            CommonTree char_literal399_tree = null;
            CommonTree char_literal401_tree = null;
            CommonTree char_literal402_tree = null;
            CommonTree char_literal403_tree = null;
            CommonTree string_literal404_tree = null;
            CommonTree string_literal405_tree = null;
            CommonTree char_literal406_tree = null;
            CommonTree char_literal408_tree = null;
            CommonTree char_literal409_tree = null;
            CommonTree char_literal410_tree = null;
            CommonTree string_literal411_tree = null;
            CommonTree string_literal412_tree = null;
            CommonTree char_literal413_tree = null;
            CommonTree char_literal415_tree = null;
            CommonTree char_literal416_tree = null;
            CommonTree char_literal418_tree = null;
            RewriteRuleITokenStream stream_132 = new RewriteRuleITokenStream(adaptor, "token 132");
            RewriteRuleITokenStream stream_146 = new RewriteRuleITokenStream(adaptor, "token 146");
            RewriteRuleITokenStream stream_147 = new RewriteRuleITokenStream(adaptor, "token 147");
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");
            RewriteRuleITokenStream stream_131 = new RewriteRuleITokenStream(adaptor, "token 131");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_ifBlock = new RewriteRuleSubtreeStream(adaptor, "rule ifBlock");
            RewriteRuleSubtreeStream stream_conditionalOrExpression = new RewriteRuleSubtreeStream(adaptor, "rule conditionalOrExpression");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            try
            {
                DebugEnterRule(GrammarFileName, "ifExprs");
                DebugLocation(763, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 52)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:764:2: ( 'if' '(' conditionalOrExpression ')' '{' p1= interleaveExpr '}' ( 'else' p2= ifBlock )? -> ^( IF_PROCESS_NODE conditionalOrExpression $p1 ( $p2)? ) | 'ifa' '(' conditionalOrExpression ')' '{' p1= interleaveExpr '}' ( 'else' p2= ifBlock )? -> ^( ATOMIC_IF_PROCESS_NODE conditionalOrExpression $p1 ( $p2)? ) | 'ifb' '(' conditionalOrExpression ')' '{' interleaveExpr '}' -> ^( BLOCKING_IF_PROCESS_NODE conditionalOrExpression interleaveExpr ) )
                    int alt122 = 3;
                    try
                    {
                        DebugEnterDecision(122, decisionCanBacktrack[122]);
                        switch (input.LA(1))
                        {
                            case 131:
                                {
                                    alt122 = 1;
                                }
                                break;
                            case 146:
                                {
                                    alt122 = 2;
                                }
                                break;
                            case 147:
                                {
                                    alt122 = 3;
                                }
                                break;
                            default:
                                {
                                    if (state.backtracking > 0) { state.failed = true; return retval; }
                                    NoViableAltException nvae = new NoViableAltException("", 122, 0, input);

                                    DebugRecognitionException(nvae);
                                    throw nvae;
                                }
                        }

                    }
                    finally { DebugExitDecision(122); }
                    switch (alt122)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:764:4: 'if' '(' conditionalOrExpression ')' '{' p1= interleaveExpr '}' ( 'else' p2= ifBlock )?
                            {
                                DebugLocation(764, 4);
                                string_literal398 = (IToken)Match(input, 131, Follow._131_in_ifExprs4306); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_131.Add(string_literal398);

                                DebugLocation(764, 9);
                                char_literal399 = (IToken)Match(input, 72, Follow._72_in_ifExprs4308); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal399);

                                DebugLocation(764, 13);
                                PushFollow(Follow._conditionalOrExpression_in_ifExprs4310);
                                conditionalOrExpression400 = conditionalOrExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression400.Tree);
                                DebugLocation(764, 37);
                                char_literal401 = (IToken)Match(input, 73, Follow._73_in_ifExprs4312); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal401);

                                DebugLocation(764, 41);
                                char_literal402 = (IToken)Match(input, 99, Follow._99_in_ifExprs4314); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_99.Add(char_literal402);

                                DebugLocation(764, 47);
                                PushFollow(Follow._interleaveExpr_in_ifExprs4318);
                                p1 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(p1.Tree);
                                DebugLocation(764, 63);
                                char_literal403 = (IToken)Match(input, 100, Follow._100_in_ifExprs4320); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_100.Add(char_literal403);

                                DebugLocation(764, 67);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:764:67: ( 'else' p2= ifBlock )?
                                int alt120 = 2;
                                try
                                {
                                    DebugEnterSubRule(120);
                                    try
                                    {
                                        DebugEnterDecision(120, decisionCanBacktrack[120]);
                                        int LA120_0 = input.LA(1);

                                        if ((LA120_0 == 132))
                                        {
                                            alt120 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(120); }
                                    switch (alt120)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:764:68: 'else' p2= ifBlock
                                            {
                                                DebugLocation(764, 68);
                                                string_literal404 = (IToken)Match(input, 132, Follow._132_in_ifExprs4323); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_132.Add(string_literal404);

                                                DebugLocation(764, 77);
                                                PushFollow(Follow._ifBlock_in_ifExprs4327);
                                                p2 = ifBlock();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_ifBlock.Add(p2.Tree);

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(120); }



                                {
                                    // AST REWRITE
                                    // elements: p2, p1, conditionalOrExpression
                                    // token labels: 
                                    // rule labels: retval, p2, p1
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                        RewriteRuleSubtreeStream stream_p2 = new RewriteRuleSubtreeStream(adaptor, "rule p2", p2 != null ? p2.Tree : null);
                                        RewriteRuleSubtreeStream stream_p1 = new RewriteRuleSubtreeStream(adaptor, "rule p1", p1 != null ? p1.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 764:89: -> ^( IF_PROCESS_NODE conditionalOrExpression $p1 ( $p2)? )
                                        {
                                            DebugLocation(764, 92);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:764:92: ^( IF_PROCESS_NODE conditionalOrExpression $p1 ( $p2)? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(764, 94);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(IF_PROCESS_NODE, "IF_PROCESS_NODE"), root_1);

                                                DebugLocation(764, 110);
                                                adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());
                                                DebugLocation(764, 134);
                                                adaptor.AddChild(root_1, stream_p1.NextTree());
                                                DebugLocation(764, 138);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:764:138: ( $p2)?
                                                if (stream_p2.HasNext)
                                                {
                                                    DebugLocation(764, 138);
                                                    adaptor.AddChild(root_1, stream_p2.NextTree());

                                                }
                                                stream_p2.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:765:4: 'ifa' '(' conditionalOrExpression ')' '{' p1= interleaveExpr '}' ( 'else' p2= ifBlock )?
                            {
                                DebugLocation(765, 4);
                                string_literal405 = (IToken)Match(input, 146, Follow._146_in_ifExprs4351); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_146.Add(string_literal405);

                                DebugLocation(765, 10);
                                char_literal406 = (IToken)Match(input, 72, Follow._72_in_ifExprs4353); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal406);

                                DebugLocation(765, 14);
                                PushFollow(Follow._conditionalOrExpression_in_ifExprs4355);
                                conditionalOrExpression407 = conditionalOrExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression407.Tree);
                                DebugLocation(765, 38);
                                char_literal408 = (IToken)Match(input, 73, Follow._73_in_ifExprs4357); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal408);

                                DebugLocation(765, 43);
                                char_literal409 = (IToken)Match(input, 99, Follow._99_in_ifExprs4360); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_99.Add(char_literal409);

                                DebugLocation(765, 49);
                                PushFollow(Follow._interleaveExpr_in_ifExprs4364);
                                p1 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(p1.Tree);
                                DebugLocation(765, 65);
                                char_literal410 = (IToken)Match(input, 100, Follow._100_in_ifExprs4366); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_100.Add(char_literal410);

                                DebugLocation(765, 69);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:765:69: ( 'else' p2= ifBlock )?
                                int alt121 = 2;
                                try
                                {
                                    DebugEnterSubRule(121);
                                    try
                                    {
                                        DebugEnterDecision(121, decisionCanBacktrack[121]);
                                        int LA121_0 = input.LA(1);

                                        if ((LA121_0 == 132))
                                        {
                                            alt121 = 1;
                                        }
                                    }
                                    finally { DebugExitDecision(121); }
                                    switch (alt121)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:765:70: 'else' p2= ifBlock
                                            {
                                                DebugLocation(765, 70);
                                                string_literal411 = (IToken)Match(input, 132, Follow._132_in_ifExprs4369); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_132.Add(string_literal411);

                                                DebugLocation(765, 79);
                                                PushFollow(Follow._ifBlock_in_ifExprs4373);
                                                p2 = ifBlock();
                                                PopFollow();
                                                if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_ifBlock.Add(p2.Tree);

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(121); }



                                {
                                    // AST REWRITE
                                    // elements: p2, conditionalOrExpression, p1
                                    // token labels: 
                                    // rule labels: retval, p2, p1
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);
                                        RewriteRuleSubtreeStream stream_p2 = new RewriteRuleSubtreeStream(adaptor, "rule p2", p2 != null ? p2.Tree : null);
                                        RewriteRuleSubtreeStream stream_p1 = new RewriteRuleSubtreeStream(adaptor, "rule p1", p1 != null ? p1.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 765:92: -> ^( ATOMIC_IF_PROCESS_NODE conditionalOrExpression $p1 ( $p2)? )
                                        {
                                            DebugLocation(765, 95);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:765:95: ^( ATOMIC_IF_PROCESS_NODE conditionalOrExpression $p1 ( $p2)? )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(765, 97);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(ATOMIC_IF_PROCESS_NODE, "ATOMIC_IF_PROCESS_NODE"), root_1);

                                                DebugLocation(765, 120);
                                                adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());
                                                DebugLocation(765, 144);
                                                adaptor.AddChild(root_1, stream_p1.NextTree());
                                                DebugLocation(765, 148);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:765:148: ( $p2)?
                                                if (stream_p2.HasNext)
                                                {
                                                    DebugLocation(765, 148);
                                                    adaptor.AddChild(root_1, stream_p2.NextTree());

                                                }
                                                stream_p2.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:766:4: 'ifb' '(' conditionalOrExpression ')' '{' interleaveExpr '}'
                            {
                                DebugLocation(766, 4);
                                string_literal412 = (IToken)Match(input, 147, Follow._147_in_ifExprs4398); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_147.Add(string_literal412);

                                DebugLocation(766, 10);
                                char_literal413 = (IToken)Match(input, 72, Follow._72_in_ifExprs4400); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal413);

                                DebugLocation(766, 14);
                                PushFollow(Follow._conditionalOrExpression_in_ifExprs4402);
                                conditionalOrExpression414 = conditionalOrExpression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_conditionalOrExpression.Add(conditionalOrExpression414.Tree);
                                DebugLocation(766, 38);
                                char_literal415 = (IToken)Match(input, 73, Follow._73_in_ifExprs4404); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal415);

                                DebugLocation(766, 43);
                                char_literal416 = (IToken)Match(input, 99, Follow._99_in_ifExprs4407); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_99.Add(char_literal416);

                                DebugLocation(766, 47);
                                PushFollow(Follow._interleaveExpr_in_ifExprs4409);
                                interleaveExpr417 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr417.Tree);
                                DebugLocation(766, 62);
                                char_literal418 = (IToken)Match(input, 100, Follow._100_in_ifExprs4411); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_100.Add(char_literal418);



                                {
                                    // AST REWRITE
                                    // elements: conditionalOrExpression, interleaveExpr
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 766:67: -> ^( BLOCKING_IF_PROCESS_NODE conditionalOrExpression interleaveExpr )
                                        {
                                            DebugLocation(766, 70);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:766:70: ^( BLOCKING_IF_PROCESS_NODE conditionalOrExpression interleaveExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(766, 72);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(BLOCKING_IF_PROCESS_NODE, "BLOCKING_IF_PROCESS_NODE"), root_1);

                                                DebugLocation(766, 97);
                                                adaptor.AddChild(root_1, stream_conditionalOrExpression.NextTree());
                                                DebugLocation(766, 121);
                                                adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("ifExprs", 52);
                    LeaveRule("ifExprs", 52);
                    Leave_ifExprs();
                    if (state.backtracking > 0) { Memoize(input, 52, ifExprs_StartIndex); }
                }
                DebugLocation(767, 1);
            }
            finally { DebugExitRule(GrammarFileName, "ifExprs"); }
            return retval;

        }
        // $ANTLR end "ifExprs"

        public class ifBlock_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_ifBlock();
        partial void Leave_ifBlock();

        // $ANTLR start "ifBlock"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:769:1: ifBlock : ( ifExprs | '{' interleaveExpr '}' );
        [GrammarRule("ifBlock")]
        private PNTreeParser.ifBlock_return ifBlock()
        {
            Enter_ifBlock();
            EnterRule("ifBlock", 53);
            TraceIn("ifBlock", 53);
            PNTreeParser.ifBlock_return retval = new PNTreeParser.ifBlock_return();
            retval.Start = (IToken)input.LT(1);
            int ifBlock_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken char_literal420 = null;
            IToken char_literal422 = null;
            PNTreeParser.ifExprs_return ifExprs419 = default(PNTreeParser.ifExprs_return);
            PNTreeParser.interleaveExpr_return interleaveExpr421 = default(PNTreeParser.interleaveExpr_return);

            CommonTree char_literal420_tree = null;
            CommonTree char_literal422_tree = null;

            try
            {
                DebugEnterRule(GrammarFileName, "ifBlock");
                DebugLocation(769, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 53)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:770:2: ( ifExprs | '{' interleaveExpr '}' )
                    int alt123 = 2;
                    try
                    {
                        DebugEnterDecision(123, decisionCanBacktrack[123]);
                        int LA123_0 = input.LA(1);

                        if ((LA123_0 == 131 || (LA123_0 >= 146 && LA123_0 <= 147)))
                        {
                            alt123 = 1;
                        }
                        else if ((LA123_0 == 99))
                        {
                            alt123 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 123, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(123); }
                    switch (alt123)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:770:4: ifExprs
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(770, 4);
                                PushFollow(Follow._ifExprs_in_ifBlock4435);
                                ifExprs419 = ifExprs();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, ifExprs419.Tree);

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:771:4: '{' interleaveExpr '}'
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(771, 7);
                                char_literal420 = (IToken)Match(input, 99, Follow._99_in_ifBlock4440); if (state.failed) return retval;
                                DebugLocation(771, 9);
                                PushFollow(Follow._interleaveExpr_in_ifBlock4443);
                                interleaveExpr421 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, interleaveExpr421.Tree);
                                DebugLocation(771, 27);
                                char_literal422 = (IToken)Match(input, 100, Follow._100_in_ifBlock4445); if (state.failed) return retval;

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("ifBlock", 53);
                    LeaveRule("ifBlock", 53);
                    Leave_ifBlock();
                    if (state.backtracking > 0) { Memoize(input, 53, ifBlock_StartIndex); }
                }
                DebugLocation(772, 1);
            }
            finally { DebugExitRule(GrammarFileName, "ifBlock"); }
            return retval;

        }
        // $ANTLR end "ifBlock"

        public class atomicExpr_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_atomicExpr();
        partial void Leave_atomicExpr();

        // $ANTLR start "atomicExpr"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:774:1: atomicExpr : ( atom | 'atomic' '{' interleaveExpr '}' -> ^( 'atomic' interleaveExpr ) );
        [GrammarRule("atomicExpr")]
        private PNTreeParser.atomicExpr_return atomicExpr()
        {
            Enter_atomicExpr();
            EnterRule("atomicExpr", 54);
            TraceIn("atomicExpr", 54);
            PNTreeParser.atomicExpr_return retval = new PNTreeParser.atomicExpr_return();
            retval.Start = (IToken)input.LT(1);
            int atomicExpr_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal424 = null;
            IToken char_literal425 = null;
            IToken char_literal427 = null;
            PNTreeParser.atom_return atom423 = default(PNTreeParser.atom_return);
            PNTreeParser.interleaveExpr_return interleaveExpr426 = default(PNTreeParser.interleaveExpr_return);

            CommonTree string_literal424_tree = null;
            CommonTree char_literal425_tree = null;
            CommonTree char_literal427_tree = null;
            RewriteRuleITokenStream stream_148 = new RewriteRuleITokenStream(adaptor, "token 148");
            RewriteRuleITokenStream stream_99 = new RewriteRuleITokenStream(adaptor, "token 99");
            RewriteRuleITokenStream stream_100 = new RewriteRuleITokenStream(adaptor, "token 100");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            paraphrases.Push("in atomic process");
            try
            {
                DebugEnterRule(GrammarFileName, "atomicExpr");
                DebugLocation(774, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 54)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:777:2: ( atom | 'atomic' '{' interleaveExpr '}' -> ^( 'atomic' interleaveExpr ) )
                    int alt124 = 2;
                    try
                    {
                        DebugEnterDecision(124, decisionCanBacktrack[124]);
                        int LA124_0 = input.LA(1);

                        if ((LA124_0 == ID || LA124_0 == 70 || LA124_0 == 72 || (LA124_0 >= 149 && LA124_0 <= 150)))
                        {
                            alt124 = 1;
                        }
                        else if ((LA124_0 == 148))
                        {
                            alt124 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 124, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(124); }
                    switch (alt124)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:777:4: atom
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(777, 4);
                                PushFollow(Follow._atom_in_atomicExpr4470);
                                atom423 = atom();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, atom423.Tree);

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:778:4: 'atomic' '{' interleaveExpr '}'
                            {
                                DebugLocation(778, 4);
                                string_literal424 = (IToken)Match(input, 148, Follow._148_in_atomicExpr4477); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_148.Add(string_literal424);

                                DebugLocation(778, 13);
                                char_literal425 = (IToken)Match(input, 99, Follow._99_in_atomicExpr4479); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_99.Add(char_literal425);

                                DebugLocation(778, 17);
                                PushFollow(Follow._interleaveExpr_in_atomicExpr4481);
                                interleaveExpr426 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr426.Tree);
                                DebugLocation(778, 32);
                                char_literal427 = (IToken)Match(input, 100, Follow._100_in_atomicExpr4483); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_100.Add(char_literal427);



                                {
                                    // AST REWRITE
                                    // elements: 148, interleaveExpr
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 778:37: -> ^( 'atomic' interleaveExpr )
                                        {
                                            DebugLocation(778, 40);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:778:40: ^( 'atomic' interleaveExpr )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(778, 42);
                                                root_1 = (CommonTree)adaptor.BecomeRoot(stream_148.NextNode(), root_1);

                                                DebugLocation(778, 51);
                                                adaptor.AddChild(root_1, stream_interleaveExpr.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                    if (state.backtracking == 0)
                    {
                        paraphrases.Pop();
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("atomicExpr", 54);
                    LeaveRule("atomicExpr", 54);
                    Leave_atomicExpr();
                    if (state.backtracking > 0) { Memoize(input, 54, atomicExpr_StartIndex); }
                }
                DebugLocation(779, 1);
            }
            finally { DebugExitRule(GrammarFileName, "atomicExpr"); }
            return retval;

        }
        // $ANTLR end "atomicExpr"

        public class atom_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_atom();
        partial void Leave_atom();

        // $ANTLR start "atom"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:781:1: atom : ( ID ( '(' ( expression ( ',' expression )* )? ')' )? -> ^( ATOM_NODE ID ( expression )* ) | 'Skip' ( '(' ')' )? | 'Stop' ( '(' ')' )? | 'assert' '(' expression ')' -> ^( 'assert' expression ) | '(' interleaveExpr ')' -> interleaveExpr );
        [GrammarRule("atom")]
        private PNTreeParser.atom_return atom()
        {
            Enter_atom();
            EnterRule("atom", 55);
            TraceIn("atom", 55);
            PNTreeParser.atom_return retval = new PNTreeParser.atom_return();
            retval.Start = (IToken)input.LT(1);
            int atom_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken ID428 = null;
            IToken char_literal429 = null;
            IToken char_literal431 = null;
            IToken char_literal433 = null;
            IToken string_literal434 = null;
            IToken char_literal435 = null;
            IToken char_literal436 = null;
            IToken string_literal437 = null;
            IToken char_literal438 = null;
            IToken char_literal439 = null;
            IToken string_literal440 = null;
            IToken char_literal441 = null;
            IToken char_literal443 = null;
            IToken char_literal444 = null;
            IToken char_literal446 = null;
            PNTreeParser.expression_return expression430 = default(PNTreeParser.expression_return);
            PNTreeParser.expression_return expression432 = default(PNTreeParser.expression_return);
            PNTreeParser.expression_return expression442 = default(PNTreeParser.expression_return);
            PNTreeParser.interleaveExpr_return interleaveExpr445 = default(PNTreeParser.interleaveExpr_return);

            CommonTree ID428_tree = null;
            CommonTree char_literal429_tree = null;
            CommonTree char_literal431_tree = null;
            CommonTree char_literal433_tree = null;
            CommonTree string_literal434_tree = null;
            CommonTree char_literal435_tree = null;
            CommonTree char_literal436_tree = null;
            CommonTree string_literal437_tree = null;
            CommonTree char_literal438_tree = null;
            CommonTree char_literal439_tree = null;
            CommonTree string_literal440_tree = null;
            CommonTree char_literal441_tree = null;
            CommonTree char_literal443_tree = null;
            CommonTree char_literal444_tree = null;
            CommonTree char_literal446_tree = null;
            RewriteRuleITokenStream stream_97 = new RewriteRuleITokenStream(adaptor, "token 97");
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_70 = new RewriteRuleITokenStream(adaptor, "token 70");
            RewriteRuleITokenStream stream_72 = new RewriteRuleITokenStream(adaptor, "token 72");
            RewriteRuleITokenStream stream_73 = new RewriteRuleITokenStream(adaptor, "token 73");
            RewriteRuleSubtreeStream stream_expression = new RewriteRuleSubtreeStream(adaptor, "rule expression");
            RewriteRuleSubtreeStream stream_interleaveExpr = new RewriteRuleSubtreeStream(adaptor, "rule interleaveExpr");
            try
            {
                DebugEnterRule(GrammarFileName, "atom");
                DebugLocation(781, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 55)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:2: ( ID ( '(' ( expression ( ',' expression )* )? ')' )? -> ^( ATOM_NODE ID ( expression )* ) | 'Skip' ( '(' ')' )? | 'Stop' ( '(' ')' )? | 'assert' '(' expression ')' -> ^( 'assert' expression ) | '(' interleaveExpr ')' -> interleaveExpr )
                    int alt130 = 5;
                    try
                    {
                        DebugEnterDecision(130, decisionCanBacktrack[130]);
                        switch (input.LA(1))
                        {
                            case ID:
                                {
                                    alt130 = 1;
                                }
                                break;
                            case 149:
                                {
                                    alt130 = 2;
                                }
                                break;
                            case 150:
                                {
                                    alt130 = 3;
                                }
                                break;
                            case 70:
                                {
                                    alt130 = 4;
                                }
                                break;
                            case 72:
                                {
                                    alt130 = 5;
                                }
                                break;
                            default:
                                {
                                    if (state.backtracking > 0) { state.failed = true; return retval; }
                                    NoViableAltException nvae = new NoViableAltException("", 130, 0, input);

                                    DebugRecognitionException(nvae);
                                    throw nvae;
                                }
                        }

                    }
                    finally { DebugExitDecision(130); }
                    switch (alt130)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:5: ID ( '(' ( expression ( ',' expression )* )? ')' )?
                            {
                                DebugLocation(782, 5);
                                ID428 = (IToken)Match(input, ID, Follow._ID_in_atom4507); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_ID.Add(ID428);

                                DebugLocation(782, 9);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:9: ( '(' ( expression ( ',' expression )* )? ')' )?
                                int alt127 = 2;
                                try
                                {
                                    DebugEnterSubRule(127);
                                    try
                                    {
                                        DebugEnterDecision(127, decisionCanBacktrack[127]);
                                        try
                                        {
                                            alt127 = dfa127.Predict(input);
                                        }
                                        catch (NoViableAltException nvae)
                                        {
                                            DebugRecognitionException(nvae);
                                            throw;
                                        }
                                    }
                                    finally { DebugExitDecision(127); }
                                    switch (alt127)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:10: '(' ( expression ( ',' expression )* )? ')'
                                            {
                                                DebugLocation(782, 10);
                                                char_literal429 = (IToken)Match(input, 72, Follow._72_in_atom4511); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_72.Add(char_literal429);

                                                DebugLocation(782, 14);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:14: ( expression ( ',' expression )* )?
                                                int alt126 = 2;
                                                try
                                                {
                                                    DebugEnterSubRule(126);
                                                    try
                                                    {
                                                        DebugEnterDecision(126, decisionCanBacktrack[126]);
                                                        int LA126_0 = input.LA(1);

                                                        if (((LA126_0 >= ID && LA126_0 <= INT) || LA126_0 == 72 || LA126_0 == 76 || (LA126_0 >= 102 && LA126_0 <= 104) || LA126_0 == 120 || (LA126_0 >= 126 && LA126_0 <= 127)))
                                                        {
                                                            alt126 = 1;
                                                        }
                                                    }
                                                    finally { DebugExitDecision(126); }
                                                    switch (alt126)
                                                    {
                                                        case 1:
                                                            DebugEnterAlt(1);
                                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:15: expression ( ',' expression )*
                                                            {
                                                                DebugLocation(782, 15);
                                                                PushFollow(Follow._expression_in_atom4514);
                                                                expression430 = expression();
                                                                PopFollow();
                                                                if (state.failed) return retval;
                                                                if (state.backtracking == 0) stream_expression.Add(expression430.Tree);
                                                                DebugLocation(782, 26);
                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:26: ( ',' expression )*
                                                                try
                                                                {
                                                                    DebugEnterSubRule(125);
                                                                    while (true)
                                                                    {
                                                                        int alt125 = 2;
                                                                        try
                                                                        {
                                                                            DebugEnterDecision(125, decisionCanBacktrack[125]);
                                                                            int LA125_0 = input.LA(1);

                                                                            if ((LA125_0 == 97))
                                                                            {
                                                                                alt125 = 1;
                                                                            }


                                                                        }
                                                                        finally { DebugExitDecision(125); }
                                                                        switch (alt125)
                                                                        {
                                                                            case 1:
                                                                                DebugEnterAlt(1);
                                                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:27: ',' expression
                                                                                {
                                                                                    DebugLocation(782, 27);
                                                                                    char_literal431 = (IToken)Match(input, 97, Follow._97_in_atom4517); if (state.failed) return retval;
                                                                                    if (state.backtracking == 0) stream_97.Add(char_literal431);

                                                                                    DebugLocation(782, 31);
                                                                                    PushFollow(Follow._expression_in_atom4519);
                                                                                    expression432 = expression();
                                                                                    PopFollow();
                                                                                    if (state.failed) return retval;
                                                                                    if (state.backtracking == 0) stream_expression.Add(expression432.Tree);

                                                                                }
                                                                                break;

                                                                            default:
                                                                                goto loop125;
                                                                        }
                                                                    }

                                                                loop125:
                                                                    ;

                                                                }
                                                                finally { DebugExitSubRule(125); }


                                                            }
                                                            break;

                                                    }
                                                }
                                                finally { DebugExitSubRule(126); }

                                                DebugLocation(782, 48);
                                                char_literal433 = (IToken)Match(input, 73, Follow._73_in_atom4527); if (state.failed) return retval;
                                                if (state.backtracking == 0) stream_73.Add(char_literal433);


                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(127); }



                                {
                                    // AST REWRITE
                                    // elements: expression, ID
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 782:54: -> ^( ATOM_NODE ID ( expression )* )
                                        {
                                            DebugLocation(782, 57);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:57: ^( ATOM_NODE ID ( expression )* )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(782, 59);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(ATOM_NODE, "ATOM_NODE"), root_1);

                                                DebugLocation(782, 69);
                                                adaptor.AddChild(root_1, stream_ID.NextNode());
                                                DebugLocation(782, 73);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:73: ( expression )*
                                                while (stream_expression.HasNext)
                                                {
                                                    DebugLocation(782, 73);
                                                    adaptor.AddChild(root_1, stream_expression.NextTree());

                                                }
                                                stream_expression.Reset();

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:783:5: 'Skip' ( '(' ')' )?
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(783, 5);
                                string_literal434 = (IToken)Match(input, 149, Follow._149_in_atom4547); if (state.failed) return retval;
                                if (state.backtracking == 0)
                                {
                                    string_literal434_tree = (CommonTree)adaptor.Create(string_literal434);
                                    adaptor.AddChild(root_0, string_literal434_tree);
                                }
                                DebugLocation(783, 12);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:783:12: ( '(' ')' )?
                                int alt128 = 2;
                                try
                                {
                                    DebugEnterSubRule(128);
                                    try
                                    {
                                        DebugEnterDecision(128, decisionCanBacktrack[128]);
                                        int LA128_0 = input.LA(1);

                                        if ((LA128_0 == 72))
                                        {
                                            int LA128_1 = input.LA(2);

                                            if ((LA128_1 == 73))
                                            {
                                                alt128 = 1;
                                            }
                                        }
                                    }
                                    finally { DebugExitDecision(128); }
                                    switch (alt128)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:783:13: '(' ')'
                                            {
                                                DebugLocation(783, 16);
                                                char_literal435 = (IToken)Match(input, 72, Follow._72_in_atom4550); if (state.failed) return retval;
                                                DebugLocation(783, 21);
                                                char_literal436 = (IToken)Match(input, 73, Follow._73_in_atom4553); if (state.failed) return retval;

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(128); }


                            }
                            break;
                        case 3:
                            DebugEnterAlt(3);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:784:5: 'Stop' ( '(' ')' )?
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(784, 5);
                                string_literal437 = (IToken)Match(input, 150, Follow._150_in_atom4562); if (state.failed) return retval;
                                if (state.backtracking == 0)
                                {
                                    string_literal437_tree = (CommonTree)adaptor.Create(string_literal437);
                                    adaptor.AddChild(root_0, string_literal437_tree);
                                }
                                DebugLocation(784, 12);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:784:12: ( '(' ')' )?
                                int alt129 = 2;
                                try
                                {
                                    DebugEnterSubRule(129);
                                    try
                                    {
                                        DebugEnterDecision(129, decisionCanBacktrack[129]);
                                        int LA129_0 = input.LA(1);

                                        if ((LA129_0 == 72))
                                        {
                                            int LA129_1 = input.LA(2);

                                            if ((LA129_1 == 73))
                                            {
                                                alt129 = 1;
                                            }
                                        }
                                    }
                                    finally { DebugExitDecision(129); }
                                    switch (alt129)
                                    {
                                        case 1:
                                            DebugEnterAlt(1);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:784:13: '(' ')'
                                            {
                                                DebugLocation(784, 16);
                                                char_literal438 = (IToken)Match(input, 72, Follow._72_in_atom4565); if (state.failed) return retval;
                                                DebugLocation(784, 21);
                                                char_literal439 = (IToken)Match(input, 73, Follow._73_in_atom4568); if (state.failed) return retval;

                                            }
                                            break;

                                    }
                                }
                                finally { DebugExitSubRule(129); }


                            }
                            break;
                        case 4:
                            DebugEnterAlt(4);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:785:5: 'assert' '(' expression ')'
                            {
                                DebugLocation(785, 5);
                                string_literal440 = (IToken)Match(input, 70, Follow._70_in_atom4577); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_70.Add(string_literal440);

                                DebugLocation(785, 14);
                                char_literal441 = (IToken)Match(input, 72, Follow._72_in_atom4579); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal441);

                                DebugLocation(785, 18);
                                PushFollow(Follow._expression_in_atom4581);
                                expression442 = expression();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_expression.Add(expression442.Tree);
                                DebugLocation(785, 29);
                                char_literal443 = (IToken)Match(input, 73, Follow._73_in_atom4583); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal443);



                                {
                                    // AST REWRITE
                                    // elements: expression, 70
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 785:33: -> ^( 'assert' expression )
                                        {
                                            DebugLocation(785, 36);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:785:36: ^( 'assert' expression )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(785, 38);
                                                root_1 = (CommonTree)adaptor.BecomeRoot(stream_70.NextNode(), root_1);

                                                DebugLocation(785, 47);
                                                adaptor.AddChild(root_1, stream_expression.NextTree());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;
                        case 5:
                            DebugEnterAlt(5);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:786:5: '(' interleaveExpr ')'
                            {
                                DebugLocation(786, 5);
                                char_literal444 = (IToken)Match(input, 72, Follow._72_in_atom4597); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_72.Add(char_literal444);

                                DebugLocation(786, 9);
                                PushFollow(Follow._interleaveExpr_in_atom4599);
                                interleaveExpr445 = interleaveExpr();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) stream_interleaveExpr.Add(interleaveExpr445.Tree);
                                DebugLocation(786, 24);
                                char_literal446 = (IToken)Match(input, 73, Follow._73_in_atom4601); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_73.Add(char_literal446);



                                {
                                    // AST REWRITE
                                    // elements: interleaveExpr
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 786:28: -> interleaveExpr
                                        {
                                            DebugLocation(786, 32);
                                            adaptor.AddChild(root_0, stream_interleaveExpr.NextTree());

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("atom", 55);
                    LeaveRule("atom", 55);
                    Leave_atom();
                    if (state.backtracking > 0) { Memoize(input, 55, atom_StartIndex); }
                }
                DebugLocation(787, 1);
            }
            finally { DebugExitRule(GrammarFileName, "atom"); }
            return retval;

        }
        // $ANTLR end "atom"

        public class eventM_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_eventM();
        partial void Leave_eventM();

        // $ANTLR start "eventM"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:794:1: eventM : ( eventName | 'tau' -> ^( EVENT_NAME_NODE 'tau' ) );
        [GrammarRule("eventM")]
        private PNTreeParser.eventM_return eventM()
        {
            Enter_eventM();
            EnterRule("eventM", 56);
            TraceIn("eventM", 56);
            PNTreeParser.eventM_return retval = new PNTreeParser.eventM_return();
            retval.Start = (IToken)input.LT(1);
            int eventM_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken string_literal448 = null;
            PNTreeParser.eventName_return eventName447 = default(PNTreeParser.eventName_return);

            CommonTree string_literal448_tree = null;
            RewriteRuleITokenStream stream_80 = new RewriteRuleITokenStream(adaptor, "token 80");

            try
            {
                DebugEnterRule(GrammarFileName, "eventM");
                DebugLocation(794, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 56)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:795:2: ( eventName | 'tau' -> ^( EVENT_NAME_NODE 'tau' ) )
                    int alt131 = 2;
                    try
                    {
                        DebugEnterDecision(131, decisionCanBacktrack[131]);
                        int LA131_0 = input.LA(1);

                        if ((LA131_0 == ID))
                        {
                            alt131 = 1;
                        }
                        else if ((LA131_0 == 80))
                        {
                            alt131 = 2;
                        }
                        else
                        {
                            if (state.backtracking > 0) { state.failed = true; return retval; }
                            NoViableAltException nvae = new NoViableAltException("", 131, 0, input);

                            DebugRecognitionException(nvae);
                            throw nvae;
                        }
                    }
                    finally { DebugExitDecision(131); }
                    switch (alt131)
                    {
                        case 1:
                            DebugEnterAlt(1);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:795:5: eventName
                            {
                                root_0 = (CommonTree)adaptor.Nil();

                                DebugLocation(795, 5);
                                PushFollow(Follow._eventName_in_eventM4622);
                                eventName447 = eventName();
                                PopFollow();
                                if (state.failed) return retval;
                                if (state.backtracking == 0) adaptor.AddChild(root_0, eventName447.Tree);

                            }
                            break;
                        case 2:
                            DebugEnterAlt(2);
                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:800:4: 'tau'
                            {
                                DebugLocation(800, 4);
                                string_literal448 = (IToken)Match(input, 80, Follow._80_in_eventM4636); if (state.failed) return retval;
                                if (state.backtracking == 0) stream_80.Add(string_literal448);



                                {
                                    // AST REWRITE
                                    // elements: 80
                                    // token labels: 
                                    // rule labels: retval
                                    // token list labels: 
                                    // rule list labels: 
                                    // wildcard labels: 
                                    if (state.backtracking == 0)
                                    {
                                        retval.Tree = root_0;
                                        RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                        root_0 = (CommonTree)adaptor.Nil();
                                        // 800:10: -> ^( EVENT_NAME_NODE 'tau' )
                                        {
                                            DebugLocation(800, 13);
                                            // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:800:13: ^( EVENT_NAME_NODE 'tau' )
                                            {
                                                CommonTree root_1 = (CommonTree)adaptor.Nil();
                                                DebugLocation(800, 15);
                                                root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(EVENT_NAME_NODE, "EVENT_NAME_NODE"), root_1);

                                                DebugLocation(800, 31);
                                                adaptor.AddChild(root_1, stream_80.NextNode());

                                                adaptor.AddChild(root_0, root_1);
                                            }

                                        }

                                        retval.Tree = root_0;
                                    }
                                }

                            }
                            break;

                    }
                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("eventM", 56);
                    LeaveRule("eventM", 56);
                    Leave_eventM();
                    if (state.backtracking > 0) { Memoize(input, 56, eventM_StartIndex); }
                }
                DebugLocation(801, 1);
            }
            finally { DebugExitRule(GrammarFileName, "eventM"); }
            return retval;

        }
        // $ANTLR end "eventM"

        public class eventName_return : ParserRuleReturnScope<IToken>, IAstRuleReturnScope<CommonTree>
        {
            private CommonTree _tree;
            public CommonTree Tree { get { return _tree; } set { _tree = value; } }
        }

        partial void Enter_eventName();
        partial void Leave_eventName();

        // $ANTLR start "eventName"
        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:804:1: eventName : ID ( '.' ex= additiveExpression )* -> ^( EVENT_NAME_NODE ID ( additiveExpression )* ) ;
        [GrammarRule("eventName")]
        private PNTreeParser.eventName_return eventName()
        {
            Enter_eventName();
            EnterRule("eventName", 57);
            TraceIn("eventName", 57);
            PNTreeParser.eventName_return retval = new PNTreeParser.eventName_return();
            retval.Start = (IToken)input.LT(1);
            int eventName_StartIndex = input.Index;
            CommonTree root_0 = null;

            IToken ID449 = null;
            IToken char_literal450 = null;
            PNTreeParser.additiveExpression_return ex = default(PNTreeParser.additiveExpression_return);

            CommonTree ID449_tree = null;
            CommonTree char_literal450_tree = null;
            RewriteRuleITokenStream stream_ID = new RewriteRuleITokenStream(adaptor, "token ID");
            RewriteRuleITokenStream stream_85 = new RewriteRuleITokenStream(adaptor, "token 85");
            RewriteRuleSubtreeStream stream_additiveExpression = new RewriteRuleSubtreeStream(adaptor, "rule additiveExpression");
            try
            {
                DebugEnterRule(GrammarFileName, "eventName");
                DebugLocation(804, 1);
                try
                {
                    if (state.backtracking > 0 && AlreadyParsedRule(input, 57)) { return retval; }
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:805:2: ( ID ( '.' ex= additiveExpression )* -> ^( EVENT_NAME_NODE ID ( additiveExpression )* ) )
                    DebugEnterAlt(1);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:805:4: ID ( '.' ex= additiveExpression )*
                    {
                        DebugLocation(805, 4);
                        ID449 = (IToken)Match(input, ID, Follow._ID_in_eventName4661); if (state.failed) return retval;
                        if (state.backtracking == 0) stream_ID.Add(ID449);

                        DebugLocation(805, 7);
                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:805:7: ( '.' ex= additiveExpression )*
                        try
                        {
                            DebugEnterSubRule(132);
                            while (true)
                            {
                                int alt132 = 2;
                                try
                                {
                                    DebugEnterDecision(132, decisionCanBacktrack[132]);
                                    int LA132_0 = input.LA(1);

                                    if ((LA132_0 == 85))
                                    {
                                        alt132 = 1;
                                    }


                                }
                                finally { DebugExitDecision(132); }
                                switch (alt132)
                                {
                                    case 1:
                                        DebugEnterAlt(1);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:805:9: '.' ex= additiveExpression
                                        {
                                            DebugLocation(805, 9);
                                            char_literal450 = (IToken)Match(input, 85, Follow._85_in_eventName4665); if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_85.Add(char_literal450);

                                            DebugLocation(805, 15);
                                            PushFollow(Follow._additiveExpression_in_eventName4669);
                                            ex = additiveExpression();
                                            PopFollow();
                                            if (state.failed) return retval;
                                            if (state.backtracking == 0) stream_additiveExpression.Add(ex.Tree);

                                        }
                                        break;

                                    default:
                                        goto loop132;
                                }
                            }

                        loop132:
                            ;

                        }
                        finally { DebugExitSubRule(132); }



                        {
                            // AST REWRITE
                            // elements: additiveExpression, ID
                            // token labels: 
                            // rule labels: retval
                            // token list labels: 
                            // rule list labels: 
                            // wildcard labels: 
                            if (state.backtracking == 0)
                            {
                                retval.Tree = root_0;
                                RewriteRuleSubtreeStream stream_retval = new RewriteRuleSubtreeStream(adaptor, "rule retval", retval != null ? retval.Tree : null);

                                root_0 = (CommonTree)adaptor.Nil();
                                // 805:37: -> ^( EVENT_NAME_NODE ID ( additiveExpression )* )
                                {
                                    DebugLocation(805, 40);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:805:40: ^( EVENT_NAME_NODE ID ( additiveExpression )* )
                                    {
                                        CommonTree root_1 = (CommonTree)adaptor.Nil();
                                        DebugLocation(805, 42);
                                        root_1 = (CommonTree)adaptor.BecomeRoot((CommonTree)adaptor.Create(EVENT_NAME_NODE, "EVENT_NAME_NODE"), root_1);

                                        DebugLocation(805, 58);
                                        adaptor.AddChild(root_1, stream_ID.NextNode());
                                        DebugLocation(805, 61);
                                        // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:805:61: ( additiveExpression )*
                                        while (stream_additiveExpression.HasNext)
                                        {
                                            DebugLocation(805, 61);
                                            adaptor.AddChild(root_1, stream_additiveExpression.NextTree());

                                        }
                                        stream_additiveExpression.Reset();

                                        adaptor.AddChild(root_0, root_1);
                                    }

                                }

                                retval.Tree = root_0;
                            }
                        }

                    }

                    retval.Stop = (IToken)input.LT(-1);

                    if (state.backtracking == 0)
                    {

                        retval.Tree = (CommonTree)adaptor.RulePostProcessing(root_0);
                        adaptor.SetTokenBoundaries(retval.Tree, retval.Start, retval.Stop);
                    }
                }

                catch (RecognitionException re)
                {
                    string ss = GetErrorMessage(re, tokenNames);
                    throw new ParsingException(ss, re.Token);
                }
                finally
                {
                    TraceOut("eventName", 57);
                    LeaveRule("eventName", 57);
                    Leave_eventName();
                    if (state.backtracking > 0) { Memoize(input, 57, eventName_StartIndex); }
                }
                DebugLocation(806, 1);
            }
            finally { DebugExitRule(GrammarFileName, "eventName"); }
            return retval;

        }
        // $ANTLR end "eventName"

        partial void Enter_synpred40_PNTree_fragment();
        partial void Leave_synpred40_PNTree_fragment();

        // $ANTLR start synpred40_PNTree
        public void synpred40_PNTree_fragment()
        {
            Enter_synpred40_PNTree_fragment();
            EnterRule("synpred40_PNTree_fragment", 97);
            TraceIn("synpred40_PNTree_fragment", 97);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:310:4: ( '#' 'define' ID ( '-' )? INT ';' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:310:4: '#' 'define' ID ( '-' )? INT ';'
                {
                    DebugLocation(310, 4);
                    Match(input, 66, Follow._66_in_synpred40_PNTree816); if (state.failed) return;
                    DebugLocation(310, 8);
                    Match(input, 101, Follow._101_in_synpred40_PNTree818); if (state.failed) return;
                    DebugLocation(310, 17);
                    Match(input, ID, Follow._ID_in_synpred40_PNTree820); if (state.failed) return;
                    DebugLocation(310, 49);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:310:49: ( '-' )?
                    int alt138 = 2;
                    try
                    {
                        DebugEnterSubRule(138);
                        try
                        {
                            DebugEnterDecision(138, decisionCanBacktrack[138]);
                            int LA138_0 = input.LA(1);

                            if ((LA138_0 == 102))
                            {
                                alt138 = 1;
                            }
                        }
                        finally { DebugExitDecision(138); }
                        switch (alt138)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: '-'
                                {
                                    DebugLocation(310, 49);
                                    Match(input, 102, Follow._102_in_synpred40_PNTree824); if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(138); }

                    DebugLocation(310, 54);
                    Match(input, INT, Follow._INT_in_synpred40_PNTree827); if (state.failed) return;
                    DebugLocation(310, 58);
                    Match(input, 68, Follow._68_in_synpred40_PNTree829); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred40_PNTree_fragment", 97);
                LeaveRule("synpred40_PNTree_fragment", 97);
                Leave_synpred40_PNTree_fragment();
            }
        }
        // $ANTLR end synpred40_PNTree

        partial void Enter_synpred42_PNTree_fragment();
        partial void Leave_synpred42_PNTree_fragment();

        // $ANTLR start synpred42_PNTree
        public void synpred42_PNTree_fragment()
        {
            Enter_synpred42_PNTree_fragment();
            EnterRule("synpred42_PNTree_fragment", 99);
            TraceIn("synpred42_PNTree_fragment", 99);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:311:4: ( '#' 'define' ID ( 'true' ';' | 'false' ';' ) )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:311:4: '#' 'define' ID ( 'true' ';' | 'false' ';' )
                {
                    DebugLocation(311, 4);
                    Match(input, 66, Follow._66_in_synpred42_PNTree847); if (state.failed) return;
                    DebugLocation(311, 8);
                    Match(input, 101, Follow._101_in_synpred42_PNTree849); if (state.failed) return;
                    DebugLocation(311, 17);
                    Match(input, ID, Follow._ID_in_synpred42_PNTree851); if (state.failed) return;
                    DebugLocation(311, 49);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:311:49: ( 'true' ';' | 'false' ';' )
                    int alt139 = 2;
                    try
                    {
                        DebugEnterSubRule(139);
                        try
                        {
                            DebugEnterDecision(139, decisionCanBacktrack[139]);
                            int LA139_0 = input.LA(1);

                            if ((LA139_0 == 103))
                            {
                                alt139 = 1;
                            }
                            else if ((LA139_0 == 104))
                            {
                                alt139 = 2;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return; }
                                NoViableAltException nvae = new NoViableAltException("", 139, 0, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        finally { DebugExitDecision(139); }
                        switch (alt139)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:311:50: 'true' ';'
                                {
                                    DebugLocation(311, 50);
                                    Match(input, 103, Follow._103_in_synpred42_PNTree856); if (state.failed) return;
                                    DebugLocation(311, 57);
                                    Match(input, 68, Follow._68_in_synpred42_PNTree858); if (state.failed) return;

                                }
                                break;
                            case 2:
                                DebugEnterAlt(2);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:312:10: 'false' ';'
                                {
                                    DebugLocation(312, 10);
                                    Match(input, 104, Follow._104_in_synpred42_PNTree880); if (state.failed) return;
                                    DebugLocation(312, 18);
                                    Match(input, 68, Follow._68_in_synpred42_PNTree882); if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(139); }


                }

            }
            finally
            {
                TraceOut("synpred42_PNTree_fragment", 99);
                LeaveRule("synpred42_PNTree_fragment", 99);
                Leave_synpred42_PNTree_fragment();
            }
        }
        // $ANTLR end synpred42_PNTree

        partial void Enter_synpred45_PNTree_fragment();
        partial void Leave_synpred45_PNTree_fragment();

        // $ANTLR start synpred45_PNTree
        public void synpred45_PNTree_fragment()
        {
            Enter_synpred45_PNTree_fragment();
            EnterRule("synpred45_PNTree_fragment", 102);
            TraceIn("synpred45_PNTree_fragment", 102);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:314:54: ( dparameter )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:314:54: dparameter
                {
                    DebugLocation(314, 54);
                    PushFollow(Follow._dparameter_in_synpred45_PNTree945);
                    dparameter();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred45_PNTree_fragment", 102);
                LeaveRule("synpred45_PNTree_fragment", 102);
                Leave_synpred45_PNTree_fragment();
            }
        }
        // $ANTLR end synpred45_PNTree

        partial void Enter_synpred48_PNTree_fragment();
        partial void Leave_synpred48_PNTree_fragment();

        // $ANTLR start synpred48_PNTree
        public void synpred48_PNTree_fragment()
        {
            PNTreeParser.statement_return s = default(PNTreeParser.statement_return);

            Enter_synpred48_PNTree_fragment();
            EnterRule("synpred48_PNTree_fragment", 105);
            TraceIn("synpred48_PNTree_fragment", 105);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:337:11: (s= statement )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:337:11: s= statement
                {
                    DebugLocation(337, 12);
                    PushFollow(Follow._statement_in_synpred48_PNTree1064);
                    s = statement();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred48_PNTree_fragment", 105);
                LeaveRule("synpred48_PNTree_fragment", 105);
                Leave_synpred48_PNTree_fragment();
            }
        }
        // $ANTLR end synpred48_PNTree

        partial void Enter_synpred82_PNTree_fragment();
        partial void Leave_synpred82_PNTree_fragment();

        // $ANTLR start synpred82_PNTree
        public void synpred82_PNTree_fragment()
        {
            IToken op = null;

            Enter_synpred82_PNTree_fragment();
            EnterRule("synpred82_PNTree_fragment", 139);
            TraceIn("synpred82_PNTree_fragment", 139);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:434:9: ( unaryExpressionNotPlusMinus (op= '++' | op= '--' ) )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:434:9: unaryExpressionNotPlusMinus (op= '++' | op= '--' )
                {
                    DebugLocation(434, 9);
                    PushFollow(Follow._unaryExpressionNotPlusMinus_in_synpred82_PNTree1787);
                    unaryExpressionNotPlusMinus();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(435, 7);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:435:7: (op= '++' | op= '--' )
                    int alt142 = 2;
                    try
                    {
                        DebugEnterSubRule(142);
                        try
                        {
                            DebugEnterDecision(142, decisionCanBacktrack[142]);
                            int LA142_0 = input.LA(1);

                            if ((LA142_0 == 124))
                            {
                                alt142 = 1;
                            }
                            else if ((LA142_0 == 125))
                            {
                                alt142 = 2;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return; }
                                NoViableAltException nvae = new NoViableAltException("", 142, 0, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        finally { DebugExitDecision(142); }
                        switch (alt142)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:435:9: op= '++'
                                {
                                    DebugLocation(435, 11);
                                    op = (IToken)Match(input, 124, Follow._124_in_synpred82_PNTree1800); if (state.failed) return;

                                }
                                break;
                            case 2:
                                DebugEnterAlt(2);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:436:9: op= '--'
                                {
                                    DebugLocation(436, 11);
                                    op = (IToken)Match(input, 125, Follow._125_in_synpred82_PNTree1831); if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(142); }


                }

            }
            finally
            {
                TraceOut("synpred82_PNTree_fragment", 139);
                LeaveRule("synpred82_PNTree_fragment", 139);
                Leave_synpred82_PNTree_fragment();
            }
        }
        // $ANTLR end synpred82_PNTree

        partial void Enter_synpred94_PNTree_fragment();
        partial void Leave_synpred94_PNTree_fragment();

        // $ANTLR start synpred94_PNTree
        public void synpred94_PNTree_fragment()
        {
            IToken var = null;
            IToken method = null;

            Enter_synpred94_PNTree_fragment();
            EnterRule("synpred94_PNTree_fragment", 151);
            TraceIn("synpred94_PNTree_fragment", 151);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:4: (var= ID '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:4: var= ID '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')'
                {
                    DebugLocation(459, 7);
                    var = (IToken)Match(input, ID, Follow._ID_in_synpred94_PNTree2035); if (state.failed) return;
                    DebugLocation(459, 11);
                    Match(input, 85, Follow._85_in_synpred94_PNTree2037); if (state.failed) return;
                    DebugLocation(459, 21);
                    method = (IToken)Match(input, ID, Follow._ID_in_synpred94_PNTree2041); if (state.failed) return;
                    DebugLocation(459, 25);
                    Match(input, 72, Follow._72_in_synpred94_PNTree2043); if (state.failed) return;
                    DebugLocation(459, 29);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:29: ( conditionalOrExpression ( ',' conditionalOrExpression )* )?
                    int alt149 = 2;
                    try
                    {
                        DebugEnterSubRule(149);
                        try
                        {
                            DebugEnterDecision(149, decisionCanBacktrack[149]);
                            int LA149_0 = input.LA(1);

                            if (((LA149_0 >= ID && LA149_0 <= INT) || LA149_0 == 72 || LA149_0 == 76 || (LA149_0 >= 102 && LA149_0 <= 104) || LA149_0 == 120 || (LA149_0 >= 126 && LA149_0 <= 127)))
                            {
                                alt149 = 1;
                            }
                        }
                        finally { DebugExitDecision(149); }
                        switch (alt149)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:30: conditionalOrExpression ( ',' conditionalOrExpression )*
                                {
                                    DebugLocation(459, 30);
                                    PushFollow(Follow._conditionalOrExpression_in_synpred94_PNTree2046);
                                    conditionalOrExpression();
                                    PopFollow();
                                    if (state.failed) return;
                                    DebugLocation(459, 54);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:54: ( ',' conditionalOrExpression )*
                                    try
                                    {
                                        DebugEnterSubRule(148);
                                        while (true)
                                        {
                                            int alt148 = 2;
                                            try
                                            {
                                                DebugEnterDecision(148, decisionCanBacktrack[148]);
                                                int LA148_0 = input.LA(1);

                                                if ((LA148_0 == 97))
                                                {
                                                    alt148 = 1;
                                                }


                                            }
                                            finally { DebugExitDecision(148); }
                                            switch (alt148)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:459:55: ',' conditionalOrExpression
                                                    {
                                                        DebugLocation(459, 55);
                                                        Match(input, 97, Follow._97_in_synpred94_PNTree2049); if (state.failed) return;
                                                        DebugLocation(459, 59);
                                                        PushFollow(Follow._conditionalOrExpression_in_synpred94_PNTree2051);
                                                        conditionalOrExpression();
                                                        PopFollow();
                                                        if (state.failed) return;

                                                    }
                                                    break;

                                                default:
                                                    goto loop148;
                                            }
                                        }

                                    loop148:
                                        ;

                                    }
                                    finally { DebugExitSubRule(148); }


                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(149); }

                    DebugLocation(459, 87);
                    Match(input, 73, Follow._73_in_synpred94_PNTree2057); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred94_PNTree_fragment", 151);
                LeaveRule("synpred94_PNTree_fragment", 151);
                Leave_synpred94_PNTree_fragment();
            }
        }
        // $ANTLR end synpred94_PNTree

        partial void Enter_synpred97_PNTree_fragment();
        partial void Leave_synpred97_PNTree_fragment();

        // $ANTLR start synpred97_PNTree
        public void synpred97_PNTree_fragment()
        {
            IToken method = null;
            PNTreeParser.arrayExpression_return a1 = default(PNTreeParser.arrayExpression_return);

            Enter_synpred97_PNTree_fragment();
            EnterRule("synpred97_PNTree_fragment", 154);
            TraceIn("synpred97_PNTree_fragment", 154);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:4: (a1= arrayExpression '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:4: a1= arrayExpression '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')'
                {
                    DebugLocation(460, 6);
                    PushFollow(Follow._arrayExpression_in_synpred97_PNTree2080);
                    a1 = arrayExpression();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(460, 23);
                    Match(input, 85, Follow._85_in_synpred97_PNTree2082); if (state.failed) return;
                    DebugLocation(460, 33);
                    method = (IToken)Match(input, ID, Follow._ID_in_synpred97_PNTree2086); if (state.failed) return;
                    DebugLocation(460, 37);
                    Match(input, 72, Follow._72_in_synpred97_PNTree2088); if (state.failed) return;
                    DebugLocation(460, 41);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:41: ( conditionalOrExpression ( ',' conditionalOrExpression )* )?
                    int alt152 = 2;
                    try
                    {
                        DebugEnterSubRule(152);
                        try
                        {
                            DebugEnterDecision(152, decisionCanBacktrack[152]);
                            int LA152_0 = input.LA(1);

                            if (((LA152_0 >= ID && LA152_0 <= INT) || LA152_0 == 72 || LA152_0 == 76 || (LA152_0 >= 102 && LA152_0 <= 104) || LA152_0 == 120 || (LA152_0 >= 126 && LA152_0 <= 127)))
                            {
                                alt152 = 1;
                            }
                        }
                        finally { DebugExitDecision(152); }
                        switch (alt152)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:42: conditionalOrExpression ( ',' conditionalOrExpression )*
                                {
                                    DebugLocation(460, 42);
                                    PushFollow(Follow._conditionalOrExpression_in_synpred97_PNTree2091);
                                    conditionalOrExpression();
                                    PopFollow();
                                    if (state.failed) return;
                                    DebugLocation(460, 66);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:66: ( ',' conditionalOrExpression )*
                                    try
                                    {
                                        DebugEnterSubRule(151);
                                        while (true)
                                        {
                                            int alt151 = 2;
                                            try
                                            {
                                                DebugEnterDecision(151, decisionCanBacktrack[151]);
                                                int LA151_0 = input.LA(1);

                                                if ((LA151_0 == 97))
                                                {
                                                    alt151 = 1;
                                                }


                                            }
                                            finally { DebugExitDecision(151); }
                                            switch (alt151)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:460:67: ',' conditionalOrExpression
                                                    {
                                                        DebugLocation(460, 67);
                                                        Match(input, 97, Follow._97_in_synpred97_PNTree2094); if (state.failed) return;
                                                        DebugLocation(460, 71);
                                                        PushFollow(Follow._conditionalOrExpression_in_synpred97_PNTree2096);
                                                        conditionalOrExpression();
                                                        PopFollow();
                                                        if (state.failed) return;

                                                    }
                                                    break;

                                                default:
                                                    goto loop151;
                                            }
                                        }

                                    loop151:
                                        ;

                                    }
                                    finally { DebugExitSubRule(151); }


                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(152); }

                    DebugLocation(460, 99);
                    Match(input, 73, Follow._73_in_synpred97_PNTree2102); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred97_PNTree_fragment", 154);
                LeaveRule("synpred97_PNTree_fragment", 154);
                Leave_synpred97_PNTree_fragment();
            }
        }
        // $ANTLR end synpred97_PNTree

        partial void Enter_synpred98_PNTree_fragment();
        partial void Leave_synpred98_PNTree_fragment();

        // $ANTLR start synpred98_PNTree
        public void synpred98_PNTree_fragment()
        {
            Enter_synpred98_PNTree_fragment();
            EnterRule("synpred98_PNTree_fragment", 155);
            TraceIn("synpred98_PNTree_fragment", 155);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:464:4: ( arrayExpression )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:464:4: arrayExpression
                {
                    DebugLocation(464, 4);
                    PushFollow(Follow._arrayExpression_in_synpred98_PNTree2126);
                    arrayExpression();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred98_PNTree_fragment", 155);
                LeaveRule("synpred98_PNTree_fragment", 155);
                Leave_synpred98_PNTree_fragment();
            }
        }
        // $ANTLR end synpred98_PNTree

        partial void Enter_synpred105_PNTree_fragment();
        partial void Leave_synpred105_PNTree_fragment();

        // $ANTLR start synpred105_PNTree
        public void synpred105_PNTree_fragment()
        {
            IToken hvar = null;
            IToken userType = null;
            IToken name = null;
            IToken wildstar = null;

            Enter_synpred105_PNTree_fragment();
            EnterRule("synpred105_PNTree_fragment", 162);
            TraceIn("synpred105_PNTree_fragment", 162);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:4: ( ( 'var' | hvar= 'hvar' ) ( '<' userType= ID '>' )? name= ID ( varaibleRange )? ( '=' ( expression | wildstar= '*' ) )? ';' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:4: ( 'var' | hvar= 'hvar' ) ( '<' userType= ID '>' )? name= ID ( varaibleRange )? ( '=' ( expression | wildstar= '*' ) )? ';'
                {
                    DebugLocation(483, 4);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:4: ( 'var' | hvar= 'hvar' )
                    int alt154 = 2;
                    try
                    {
                        DebugEnterSubRule(154);
                        try
                        {
                            DebugEnterDecision(154, decisionCanBacktrack[154]);
                            int LA154_0 = input.LA(1);

                            if ((LA154_0 == 106))
                            {
                                alt154 = 1;
                            }
                            else if ((LA154_0 == 128))
                            {
                                alt154 = 2;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return; }
                                NoViableAltException nvae = new NoViableAltException("", 154, 0, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        finally { DebugExitDecision(154); }
                        switch (alt154)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:5: 'var'
                                {
                                    DebugLocation(483, 5);
                                    Match(input, 106, Follow._106_in_synpred105_PNTree2183); if (state.failed) return;

                                }
                                break;
                            case 2:
                                DebugEnterAlt(2);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:11: hvar= 'hvar'
                                {
                                    DebugLocation(483, 15);
                                    hvar = (IToken)Match(input, 128, Follow._128_in_synpred105_PNTree2187); if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(154); }

                    DebugLocation(483, 24);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:24: ( '<' userType= ID '>' )?
                    int alt155 = 2;
                    try
                    {
                        DebugEnterSubRule(155);
                        try
                        {
                            DebugEnterDecision(155, decisionCanBacktrack[155]);
                            int LA155_0 = input.LA(1);

                            if ((LA155_0 == 116))
                            {
                                alt155 = 1;
                            }
                        }
                        finally { DebugExitDecision(155); }
                        switch (alt155)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:25: '<' userType= ID '>'
                                {
                                    DebugLocation(483, 25);
                                    Match(input, 116, Follow._116_in_synpred105_PNTree2191); if (state.failed) return;
                                    DebugLocation(483, 37);
                                    userType = (IToken)Match(input, ID, Follow._ID_in_synpred105_PNTree2195); if (state.failed) return;
                                    DebugLocation(483, 41);
                                    Match(input, 117, Follow._117_in_synpred105_PNTree2197); if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(155); }

                    DebugLocation(483, 51);
                    name = (IToken)Match(input, ID, Follow._ID_in_synpred105_PNTree2203); if (state.failed) return;
                    DebugLocation(483, 55);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:55: ( varaibleRange )?
                    int alt156 = 2;
                    try
                    {
                        DebugEnterSubRule(156);
                        try
                        {
                            DebugEnterDecision(156, decisionCanBacktrack[156]);
                            int LA156_0 = input.LA(1);

                            if ((LA156_0 == 129))
                            {
                                alt156 = 1;
                            }
                        }
                        finally { DebugExitDecision(156); }
                        switch (alt156)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: varaibleRange
                                {
                                    DebugLocation(483, 55);
                                    PushFollow(Follow._varaibleRange_in_synpred105_PNTree2205);
                                    varaibleRange();
                                    PopFollow();
                                    if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(156); }

                    DebugLocation(483, 70);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:70: ( '=' ( expression | wildstar= '*' ) )?
                    int alt158 = 2;
                    try
                    {
                        DebugEnterSubRule(158);
                        try
                        {
                            DebugEnterDecision(158, decisionCanBacktrack[158]);
                            int LA158_0 = input.LA(1);

                            if ((LA158_0 == 107))
                            {
                                alt158 = 1;
                            }
                        }
                        finally { DebugExitDecision(158); }
                        switch (alt158)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:71: '=' ( expression | wildstar= '*' )
                                {
                                    DebugLocation(483, 71);
                                    Match(input, 107, Follow._107_in_synpred105_PNTree2209); if (state.failed) return;
                                    DebugLocation(483, 75);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:75: ( expression | wildstar= '*' )
                                    int alt157 = 2;
                                    try
                                    {
                                        DebugEnterSubRule(157);
                                        try
                                        {
                                            DebugEnterDecision(157, decisionCanBacktrack[157]);
                                            int LA157_0 = input.LA(1);

                                            if (((LA157_0 >= ID && LA157_0 <= INT) || LA157_0 == 72 || LA157_0 == 76 || (LA157_0 >= 102 && LA157_0 <= 104) || LA157_0 == 120 || (LA157_0 >= 126 && LA157_0 <= 127)))
                                            {
                                                alt157 = 1;
                                            }
                                            else if ((LA157_0 == 121))
                                            {
                                                alt157 = 2;
                                            }
                                            else
                                            {
                                                if (state.backtracking > 0) { state.failed = true; return; }
                                                NoViableAltException nvae = new NoViableAltException("", 157, 0, input);

                                                DebugRecognitionException(nvae);
                                                throw nvae;
                                            }
                                        }
                                        finally { DebugExitDecision(157); }
                                        switch (alt157)
                                        {
                                            case 1:
                                                DebugEnterAlt(1);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:76: expression
                                                {
                                                    DebugLocation(483, 76);
                                                    PushFollow(Follow._expression_in_synpred105_PNTree2212);
                                                    expression();
                                                    PopFollow();
                                                    if (state.failed) return;

                                                }
                                                break;
                                            case 2:
                                                DebugEnterAlt(2);
                                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:483:87: wildstar= '*'
                                                {
                                                    DebugLocation(483, 95);
                                                    wildstar = (IToken)Match(input, 121, Follow._121_in_synpred105_PNTree2216); if (state.failed) return;

                                                }
                                                break;

                                        }
                                    }
                                    finally { DebugExitSubRule(157); }


                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(158); }

                    DebugLocation(483, 104);
                    Match(input, 68, Follow._68_in_synpred105_PNTree2222); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred105_PNTree_fragment", 162);
                LeaveRule("synpred105_PNTree_fragment", 162);
                Leave_synpred105_PNTree_fragment();
            }
        }
        // $ANTLR end synpred105_PNTree

        partial void Enter_synpred108_PNTree_fragment();
        partial void Leave_synpred108_PNTree_fragment();

        // $ANTLR start synpred108_PNTree
        public void synpred108_PNTree_fragment()
        {
            IToken hvar = null;

            Enter_synpred108_PNTree_fragment();
            EnterRule("synpred108_PNTree_fragment", 165);
            TraceIn("synpred108_PNTree_fragment", 165);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:4: ( ( 'var' | hvar= 'hvar' ) ID ( varaibleRange )? '=' recordExpression ';' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:4: ( 'var' | hvar= 'hvar' ) ID ( varaibleRange )? '=' recordExpression ';'
                {
                    DebugLocation(490, 4);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:4: ( 'var' | hvar= 'hvar' )
                    int alt159 = 2;
                    try
                    {
                        DebugEnterSubRule(159);
                        try
                        {
                            DebugEnterDecision(159, decisionCanBacktrack[159]);
                            int LA159_0 = input.LA(1);

                            if ((LA159_0 == 106))
                            {
                                alt159 = 1;
                            }
                            else if ((LA159_0 == 128))
                            {
                                alt159 = 2;
                            }
                            else
                            {
                                if (state.backtracking > 0) { state.failed = true; return; }
                                NoViableAltException nvae = new NoViableAltException("", 159, 0, input);

                                DebugRecognitionException(nvae);
                                throw nvae;
                            }
                        }
                        finally { DebugExitDecision(159); }
                        switch (alt159)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:5: 'var'
                                {
                                    DebugLocation(490, 5);
                                    Match(input, 106, Follow._106_in_synpred108_PNTree2257); if (state.failed) return;

                                }
                                break;
                            case 2:
                                DebugEnterAlt(2);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:11: hvar= 'hvar'
                                {
                                    DebugLocation(490, 15);
                                    hvar = (IToken)Match(input, 128, Follow._128_in_synpred108_PNTree2261); if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(159); }

                    DebugLocation(490, 24);
                    Match(input, ID, Follow._ID_in_synpred108_PNTree2264); if (state.failed) return;
                    DebugLocation(490, 27);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:490:27: ( varaibleRange )?
                    int alt160 = 2;
                    try
                    {
                        DebugEnterSubRule(160);
                        try
                        {
                            DebugEnterDecision(160, decisionCanBacktrack[160]);
                            int LA160_0 = input.LA(1);

                            if ((LA160_0 == 129))
                            {
                                alt160 = 1;
                            }
                        }
                        finally { DebugExitDecision(160); }
                        switch (alt160)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:0:0: varaibleRange
                                {
                                    DebugLocation(490, 27);
                                    PushFollow(Follow._varaibleRange_in_synpred108_PNTree2266);
                                    varaibleRange();
                                    PopFollow();
                                    if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(160); }

                    DebugLocation(490, 42);
                    Match(input, 107, Follow._107_in_synpred108_PNTree2269); if (state.failed) return;
                    DebugLocation(490, 46);
                    PushFollow(Follow._recordExpression_in_synpred108_PNTree2271);
                    recordExpression();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(490, 63);
                    Match(input, 68, Follow._68_in_synpred108_PNTree2273); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred108_PNTree_fragment", 165);
                LeaveRule("synpred108_PNTree_fragment", 165);
                Leave_synpred108_PNTree_fragment();
            }
        }
        // $ANTLR end synpred108_PNTree

        partial void Enter_synpred116_PNTree_fragment();
        partial void Leave_synpred116_PNTree_fragment();

        // $ANTLR start synpred116_PNTree
        public void synpred116_PNTree_fragment()
        {
            PNTreeParser.statement_return s2 = default(PNTreeParser.statement_return);

            Enter_synpred116_PNTree_fragment();
            EnterRule("synpred116_PNTree_fragment", 173);
            TraceIn("synpred116_PNTree_fragment", 173);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:544:158: ( 'else' s2= statement )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:544:158: 'else' s2= statement
                {
                    DebugLocation(544, 158);
                    Match(input, 132, Follow._132_in_synpred116_PNTree2464); if (state.failed) return;
                    DebugLocation(544, 167);
                    PushFollow(Follow._statement_in_synpred116_PNTree2468);
                    s2 = statement();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred116_PNTree_fragment", 173);
                LeaveRule("synpred116_PNTree_fragment", 173);
                Leave_synpred116_PNTree_fragment();
            }
        }
        // $ANTLR end synpred116_PNTree

        partial void Enter_synpred132_PNTree_fragment();
        partial void Leave_synpred132_PNTree_fragment();

        // $ANTLR start synpred132_PNTree
        public void synpred132_PNTree_fragment()
        {
            IToken name = null;

            Enter_synpred132_PNTree_fragment();
            EnterRule("synpred132_PNTree_fragment", 189);
            TraceIn("synpred132_PNTree_fragment", 189);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:587:4: (name= ID '!' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:587:4: name= ID '!'
                {
                    DebugLocation(587, 8);
                    name = (IToken)Match(input, ID, Follow._ID_in_synpred132_PNTree2929); if (state.failed) return;
                    DebugLocation(587, 12);
                    Match(input, 76, Follow._76_in_synpred132_PNTree2931); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred132_PNTree_fragment", 189);
                LeaveRule("synpred132_PNTree_fragment", 189);
                Leave_synpred132_PNTree_fragment();
            }
        }
        // $ANTLR end synpred132_PNTree

        partial void Enter_synpred133_PNTree_fragment();
        partial void Leave_synpred133_PNTree_fragment();

        // $ANTLR start synpred133_PNTree
        public void synpred133_PNTree_fragment()
        {
            IToken name = null;

            Enter_synpred133_PNTree_fragment();
            EnterRule("synpred133_PNTree_fragment", 190);
            TraceIn("synpred133_PNTree_fragment", 190);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:588:4: (name= ID '?' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:588:4: name= ID '?'
                {
                    DebugLocation(588, 8);
                    name = (IToken)Match(input, ID, Follow._ID_in_synpred133_PNTree2947); if (state.failed) return;
                    DebugLocation(588, 12);
                    Match(input, 77, Follow._77_in_synpred133_PNTree2949); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred133_PNTree_fragment", 190);
                LeaveRule("synpred133_PNTree_fragment", 190);
                Leave_synpred133_PNTree_fragment();
            }
        }
        // $ANTLR end synpred133_PNTree

        partial void Enter_synpred134_PNTree_fragment();
        partial void Leave_synpred134_PNTree_fragment();

        // $ANTLR start synpred134_PNTree
        public void synpred134_PNTree_fragment()
        {
            IToken name = null;

            Enter_synpred134_PNTree_fragment();
            EnterRule("synpred134_PNTree_fragment", 191);
            TraceIn("synpred134_PNTree_fragment", 191);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:589:4: (name= ID '[' conditionalOrExpression ']' '!' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:589:4: name= ID '[' conditionalOrExpression ']' '!'
                {
                    DebugLocation(589, 8);
                    name = (IToken)Match(input, ID, Follow._ID_in_synpred134_PNTree2966); if (state.failed) return;
                    DebugLocation(589, 12);
                    Match(input, 108, Follow._108_in_synpred134_PNTree2968); if (state.failed) return;
                    DebugLocation(589, 16);
                    PushFollow(Follow._conditionalOrExpression_in_synpred134_PNTree2970);
                    conditionalOrExpression();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(589, 40);
                    Match(input, 109, Follow._109_in_synpred134_PNTree2972); if (state.failed) return;
                    DebugLocation(589, 44);
                    Match(input, 76, Follow._76_in_synpred134_PNTree2974); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred134_PNTree_fragment", 191);
                LeaveRule("synpred134_PNTree_fragment", 191);
                Leave_synpred134_PNTree_fragment();
            }
        }
        // $ANTLR end synpred134_PNTree

        partial void Enter_synpred135_PNTree_fragment();
        partial void Leave_synpred135_PNTree_fragment();

        // $ANTLR start synpred135_PNTree
        public void synpred135_PNTree_fragment()
        {
            IToken name = null;

            Enter_synpred135_PNTree_fragment();
            EnterRule("synpred135_PNTree_fragment", 192);
            TraceIn("synpred135_PNTree_fragment", 192);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:590:4: (name= ID '[' conditionalOrExpression ']' '?' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:590:4: name= ID '[' conditionalOrExpression ']' '?'
                {
                    DebugLocation(590, 8);
                    name = (IToken)Match(input, ID, Follow._ID_in_synpred135_PNTree2992); if (state.failed) return;
                    DebugLocation(590, 12);
                    Match(input, 108, Follow._108_in_synpred135_PNTree2994); if (state.failed) return;
                    DebugLocation(590, 16);
                    PushFollow(Follow._conditionalOrExpression_in_synpred135_PNTree2996);
                    conditionalOrExpression();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(590, 40);
                    Match(input, 109, Follow._109_in_synpred135_PNTree2998); if (state.failed) return;
                    DebugLocation(590, 44);
                    Match(input, 77, Follow._77_in_synpred135_PNTree3000); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred135_PNTree_fragment", 192);
                LeaveRule("synpred135_PNTree_fragment", 192);
                Leave_synpred135_PNTree_fragment();
            }
        }
        // $ANTLR end synpred135_PNTree

        partial void Enter_synpred136_PNTree_fragment();
        partial void Leave_synpred136_PNTree_fragment();

        // $ANTLR start synpred136_PNTree
        public void synpred136_PNTree_fragment()
        {
            Enter_synpred136_PNTree_fragment();
            EnterRule("synpred136_PNTree_fragment", 193);
            TraceIn("synpred136_PNTree_fragment", 193);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:6: ( '|||' parallelExpr )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:6: '|||' parallelExpr
                {
                    DebugLocation(600, 6);
                    Match(input, 139, Follow._139_in_synpred136_PNTree3057); if (state.failed) return;
                    DebugLocation(600, 12);
                    PushFollow(Follow._parallelExpr_in_synpred136_PNTree3059);
                    parallelExpr();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred136_PNTree_fragment", 193);
                LeaveRule("synpred136_PNTree_fragment", 193);
                Leave_synpred136_PNTree_fragment();
            }
        }
        // $ANTLR end synpred136_PNTree

        partial void Enter_synpred137_PNTree_fragment();
        partial void Leave_synpred137_PNTree_fragment();

        // $ANTLR start synpred137_PNTree
        public void synpred137_PNTree_fragment()
        {
            Enter_synpred137_PNTree_fragment();
            EnterRule("synpred137_PNTree_fragment", 194);
            TraceIn("synpred137_PNTree_fragment", 194);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:5: ( ( '|||' parallelExpr )+ )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:5: ( '|||' parallelExpr )+
                {
                    DebugLocation(600, 5);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:5: ( '|||' parallelExpr )+
                    int cnt171 = 0;
                    try
                    {
                        DebugEnterSubRule(171);
                        while (true)
                        {
                            int alt171 = 2;
                            try
                            {
                                DebugEnterDecision(171, decisionCanBacktrack[171]);
                                int LA171_0 = input.LA(1);

                                if ((LA171_0 == 139))
                                {
                                    alt171 = 1;
                                }


                            }
                            finally { DebugExitDecision(171); }
                            switch (alt171)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:600:6: '|||' parallelExpr
                                    {
                                        DebugLocation(600, 6);
                                        Match(input, 139, Follow._139_in_synpred137_PNTree3057); if (state.failed) return;
                                        DebugLocation(600, 12);
                                        PushFollow(Follow._parallelExpr_in_synpred137_PNTree3059);
                                        parallelExpr();
                                        PopFollow();
                                        if (state.failed) return;

                                    }
                                    break;

                                default:
                                    if (cnt171 >= 1)
                                        goto loop171;

                                    if (state.backtracking > 0) { state.failed = true; return; }
                                    EarlyExitException eee171 = new EarlyExitException(171, input);
                                    DebugRecognitionException(eee171);
                                    throw eee171;
                            }
                            cnt171++;
                        }
                    loop171:
                        ;

                    }
                    finally { DebugExitSubRule(171); }


                }

            }
            finally
            {
                TraceOut("synpred137_PNTree_fragment", 194);
                LeaveRule("synpred137_PNTree_fragment", 194);
                Leave_synpred137_PNTree_fragment();
            }
        }
        // $ANTLR end synpred137_PNTree

        partial void Enter_synpred141_PNTree_fragment();
        partial void Leave_synpred141_PNTree_fragment();

        // $ANTLR start synpred141_PNTree
        public void synpred141_PNTree_fragment()
        {
            Enter_synpred141_PNTree_fragment();
            EnterRule("synpred141_PNTree_fragment", 198);
            TraceIn("synpred141_PNTree_fragment", 198);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:4: ( '||' generalChoiceExpr )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:4: '||' generalChoiceExpr
                {
                    DebugLocation(614, 4);
                    Match(input, 79, Follow._79_in_synpred141_PNTree3190); if (state.failed) return;
                    DebugLocation(614, 9);
                    PushFollow(Follow._generalChoiceExpr_in_synpred141_PNTree3192);
                    generalChoiceExpr();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred141_PNTree_fragment", 198);
                LeaveRule("synpred141_PNTree_fragment", 198);
                Leave_synpred141_PNTree_fragment();
            }
        }
        // $ANTLR end synpred141_PNTree

        partial void Enter_synpred142_PNTree_fragment();
        partial void Leave_synpred142_PNTree_fragment();

        // $ANTLR start synpred142_PNTree
        public void synpred142_PNTree_fragment()
        {
            Enter_synpred142_PNTree_fragment();
            EnterRule("synpred142_PNTree_fragment", 199);
            TraceIn("synpred142_PNTree_fragment", 199);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:3: ( ( '||' generalChoiceExpr )+ )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:3: ( '||' generalChoiceExpr )+
                {
                    DebugLocation(614, 3);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:3: ( '||' generalChoiceExpr )+
                    int cnt175 = 0;
                    try
                    {
                        DebugEnterSubRule(175);
                        while (true)
                        {
                            int alt175 = 2;
                            try
                            {
                                DebugEnterDecision(175, decisionCanBacktrack[175]);
                                int LA175_0 = input.LA(1);

                                if ((LA175_0 == 79))
                                {
                                    alt175 = 1;
                                }


                            }
                            finally { DebugExitDecision(175); }
                            switch (alt175)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:614:4: '||' generalChoiceExpr
                                    {
                                        DebugLocation(614, 4);
                                        Match(input, 79, Follow._79_in_synpred142_PNTree3190); if (state.failed) return;
                                        DebugLocation(614, 9);
                                        PushFollow(Follow._generalChoiceExpr_in_synpred142_PNTree3192);
                                        generalChoiceExpr();
                                        PopFollow();
                                        if (state.failed) return;

                                    }
                                    break;

                                default:
                                    if (cnt175 >= 1)
                                        goto loop175;

                                    if (state.backtracking > 0) { state.failed = true; return; }
                                    EarlyExitException eee175 = new EarlyExitException(175, input);
                                    DebugRecognitionException(eee175);
                                    throw eee175;
                            }
                            cnt175++;
                        }
                    loop175:
                        ;

                    }
                    finally { DebugExitSubRule(175); }


                }

            }
            finally
            {
                TraceOut("synpred142_PNTree_fragment", 199);
                LeaveRule("synpred142_PNTree_fragment", 199);
                Leave_synpred142_PNTree_fragment();
            }
        }
        // $ANTLR end synpred142_PNTree

        partial void Enter_synpred146_PNTree_fragment();
        partial void Leave_synpred146_PNTree_fragment();

        // $ANTLR start synpred146_PNTree
        public void synpred146_PNTree_fragment()
        {
            Enter_synpred146_PNTree_fragment();
            EnterRule("synpred146_PNTree_fragment", 203);
            TraceIn("synpred146_PNTree_fragment", 203);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:621:4: ( ID ':' '{' additiveExpression ( ',' additiveExpression )* '}' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:621:4: ID ':' '{' additiveExpression ( ',' additiveExpression )* '}'
                {
                    DebugLocation(621, 4);
                    Match(input, ID, Follow._ID_in_synpred146_PNTree3270); if (state.failed) return;
                    DebugLocation(621, 7);
                    Match(input, 129, Follow._129_in_synpred146_PNTree3272); if (state.failed) return;
                    DebugLocation(621, 11);
                    Match(input, 99, Follow._99_in_synpred146_PNTree3274); if (state.failed) return;
                    DebugLocation(621, 15);
                    PushFollow(Follow._additiveExpression_in_synpred146_PNTree3276);
                    additiveExpression();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(621, 34);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:621:34: ( ',' additiveExpression )*
                    try
                    {
                        DebugEnterSubRule(178);
                        while (true)
                        {
                            int alt178 = 2;
                            try
                            {
                                DebugEnterDecision(178, decisionCanBacktrack[178]);
                                int LA178_0 = input.LA(1);

                                if ((LA178_0 == 97))
                                {
                                    alt178 = 1;
                                }


                            }
                            finally { DebugExitDecision(178); }
                            switch (alt178)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:621:35: ',' additiveExpression
                                    {
                                        DebugLocation(621, 35);
                                        Match(input, 97, Follow._97_in_synpred146_PNTree3279); if (state.failed) return;
                                        DebugLocation(621, 39);
                                        PushFollow(Follow._additiveExpression_in_synpred146_PNTree3281);
                                        additiveExpression();
                                        PopFollow();
                                        if (state.failed) return;

                                    }
                                    break;

                                default:
                                    goto loop178;
                            }
                        }

                    loop178:
                        ;

                    }
                    finally { DebugExitSubRule(178); }

                    DebugLocation(621, 61);
                    Match(input, 100, Follow._100_in_synpred146_PNTree3286); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred146_PNTree_fragment", 203);
                LeaveRule("synpred146_PNTree_fragment", 203);
                Leave_synpred146_PNTree_fragment();
            }
        }
        // $ANTLR end synpred146_PNTree

        partial void Enter_synpred148_PNTree_fragment();
        partial void Leave_synpred148_PNTree_fragment();

        // $ANTLR start synpred148_PNTree
        public void synpred148_PNTree_fragment()
        {
            Enter_synpred148_PNTree_fragment();
            EnterRule("synpred148_PNTree_fragment", 205);
            TraceIn("synpred148_PNTree_fragment", 205);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:6: ( '[]' internalChoiceExpr )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:6: '[]' internalChoiceExpr
                {
                    DebugLocation(639, 6);
                    Match(input, 74, Follow._74_in_synpred148_PNTree3431); if (state.failed) return;
                    DebugLocation(639, 11);
                    PushFollow(Follow._internalChoiceExpr_in_synpred148_PNTree3433);
                    internalChoiceExpr();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred148_PNTree_fragment", 205);
                LeaveRule("synpred148_PNTree_fragment", 205);
                Leave_synpred148_PNTree_fragment();
            }
        }
        // $ANTLR end synpred148_PNTree

        partial void Enter_synpred149_PNTree_fragment();
        partial void Leave_synpred149_PNTree_fragment();

        // $ANTLR start synpred149_PNTree
        public void synpred149_PNTree_fragment()
        {
            Enter_synpred149_PNTree_fragment();
            EnterRule("synpred149_PNTree_fragment", 206);
            TraceIn("synpred149_PNTree_fragment", 206);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:5: ( ( '[]' internalChoiceExpr )+ )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:5: ( '[]' internalChoiceExpr )+
                {
                    DebugLocation(639, 5);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:5: ( '[]' internalChoiceExpr )+
                    int cnt179 = 0;
                    try
                    {
                        DebugEnterSubRule(179);
                        while (true)
                        {
                            int alt179 = 2;
                            try
                            {
                                DebugEnterDecision(179, decisionCanBacktrack[179]);
                                int LA179_0 = input.LA(1);

                                if ((LA179_0 == 74))
                                {
                                    alt179 = 1;
                                }


                            }
                            finally { DebugExitDecision(179); }
                            switch (alt179)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:639:6: '[]' internalChoiceExpr
                                    {
                                        DebugLocation(639, 6);
                                        Match(input, 74, Follow._74_in_synpred149_PNTree3431); if (state.failed) return;
                                        DebugLocation(639, 11);
                                        PushFollow(Follow._internalChoiceExpr_in_synpred149_PNTree3433);
                                        internalChoiceExpr();
                                        PopFollow();
                                        if (state.failed) return;

                                    }
                                    break;

                                default:
                                    if (cnt179 >= 1)
                                        goto loop179;

                                    if (state.backtracking > 0) { state.failed = true; return; }
                                    EarlyExitException eee179 = new EarlyExitException(179, input);
                                    DebugRecognitionException(eee179);
                                    throw eee179;
                            }
                            cnt179++;
                        }
                    loop179:
                        ;

                    }
                    finally { DebugExitSubRule(179); }


                }

            }
            finally
            {
                TraceOut("synpred149_PNTree_fragment", 206);
                LeaveRule("synpred149_PNTree_fragment", 206);
                Leave_synpred149_PNTree_fragment();
            }
        }
        // $ANTLR end synpred149_PNTree

        partial void Enter_synpred152_PNTree_fragment();
        partial void Leave_synpred152_PNTree_fragment();

        // $ANTLR start synpred152_PNTree
        public void synpred152_PNTree_fragment()
        {
            Enter_synpred152_PNTree_fragment();
            EnterRule("synpred152_PNTree_fragment", 209);
            TraceIn("synpred152_PNTree_fragment", 209);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:6: ( '<>' externalChoiceExpr )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:6: '<>' externalChoiceExpr
                {
                    DebugLocation(653, 6);
                    Match(input, 75, Follow._75_in_synpred152_PNTree3553); if (state.failed) return;
                    DebugLocation(653, 11);
                    PushFollow(Follow._externalChoiceExpr_in_synpred152_PNTree3555);
                    externalChoiceExpr();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred152_PNTree_fragment", 209);
                LeaveRule("synpred152_PNTree_fragment", 209);
                Leave_synpred152_PNTree_fragment();
            }
        }
        // $ANTLR end synpred152_PNTree

        partial void Enter_synpred153_PNTree_fragment();
        partial void Leave_synpred153_PNTree_fragment();

        // $ANTLR start synpred153_PNTree
        public void synpred153_PNTree_fragment()
        {
            Enter_synpred153_PNTree_fragment();
            EnterRule("synpred153_PNTree_fragment", 210);
            TraceIn("synpred153_PNTree_fragment", 210);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:5: ( ( '<>' externalChoiceExpr )+ )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:5: ( '<>' externalChoiceExpr )+
                {
                    DebugLocation(653, 5);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:5: ( '<>' externalChoiceExpr )+
                    int cnt182 = 0;
                    try
                    {
                        DebugEnterSubRule(182);
                        while (true)
                        {
                            int alt182 = 2;
                            try
                            {
                                DebugEnterDecision(182, decisionCanBacktrack[182]);
                                int LA182_0 = input.LA(1);

                                if ((LA182_0 == 75))
                                {
                                    alt182 = 1;
                                }


                            }
                            finally { DebugExitDecision(182); }
                            switch (alt182)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:653:6: '<>' externalChoiceExpr
                                    {
                                        DebugLocation(653, 6);
                                        Match(input, 75, Follow._75_in_synpred153_PNTree3553); if (state.failed) return;
                                        DebugLocation(653, 11);
                                        PushFollow(Follow._externalChoiceExpr_in_synpred153_PNTree3555);
                                        externalChoiceExpr();
                                        PopFollow();
                                        if (state.failed) return;

                                    }
                                    break;

                                default:
                                    if (cnt182 >= 1)
                                        goto loop182;

                                    if (state.backtracking > 0) { state.failed = true; return; }
                                    EarlyExitException eee182 = new EarlyExitException(182, input);
                                    DebugRecognitionException(eee182);
                                    throw eee182;
                            }
                            cnt182++;
                        }
                    loop182:
                        ;

                    }
                    finally { DebugExitSubRule(182); }


                }

            }
            finally
            {
                TraceOut("synpred153_PNTree_fragment", 210);
                LeaveRule("synpred153_PNTree_fragment", 210);
                Leave_synpred153_PNTree_fragment();
            }
        }
        // $ANTLR end synpred153_PNTree

        partial void Enter_synpred166_PNTree_fragment();
        partial void Leave_synpred166_PNTree_fragment();

        // $ANTLR start synpred166_PNTree
        public void synpred166_PNTree_fragment()
        {
            IToken name = null;

            Enter_synpred166_PNTree_fragment();
            EnterRule("synpred166_PNTree_fragment", 223);
            TraceIn("synpred166_PNTree_fragment", 223);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:723:4: (name= ID '!' expression ( '.' expression )* '->' channelExpr )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:723:4: name= ID '!' expression ( '.' expression )* '->' channelExpr
                {
                    DebugLocation(723, 8);
                    name = (IToken)Match(input, ID, Follow._ID_in_synpred166_PNTree3958); if (state.failed) return;
                    DebugLocation(723, 12);
                    Match(input, 76, Follow._76_in_synpred166_PNTree3960); if (state.failed) return;
                    DebugLocation(723, 16);
                    PushFollow(Follow._expression_in_synpred166_PNTree3962);
                    expression();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(723, 27);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:723:27: ( '.' expression )*
                    try
                    {
                        DebugEnterSubRule(189);
                        while (true)
                        {
                            int alt189 = 2;
                            try
                            {
                                DebugEnterDecision(189, decisionCanBacktrack[189]);
                                int LA189_0 = input.LA(1);

                                if ((LA189_0 == 85))
                                {
                                    alt189 = 1;
                                }


                            }
                            finally { DebugExitDecision(189); }
                            switch (alt189)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:723:28: '.' expression
                                    {
                                        DebugLocation(723, 28);
                                        Match(input, 85, Follow._85_in_synpred166_PNTree3965); if (state.failed) return;
                                        DebugLocation(723, 32);
                                        PushFollow(Follow._expression_in_synpred166_PNTree3967);
                                        expression();
                                        PopFollow();
                                        if (state.failed) return;

                                    }
                                    break;

                                default:
                                    goto loop189;
                            }
                        }

                    loop189:
                        ;

                    }
                    finally { DebugExitSubRule(189); }

                    DebugLocation(723, 45);
                    Match(input, 81, Follow._81_in_synpred166_PNTree3971); if (state.failed) return;
                    DebugLocation(723, 50);
                    PushFollow(Follow._channelExpr_in_synpred166_PNTree3973);
                    channelExpr();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred166_PNTree_fragment", 223);
                LeaveRule("synpred166_PNTree_fragment", 223);
                Leave_synpred166_PNTree_fragment();
            }
        }
        // $ANTLR end synpred166_PNTree

        partial void Enter_synpred169_PNTree_fragment();
        partial void Leave_synpred169_PNTree_fragment();

        // $ANTLR start synpred169_PNTree
        public void synpred169_PNTree_fragment()
        {
            IToken name = null;
            PNTreeParser.conditionalOrExpression_return guard = default(PNTreeParser.conditionalOrExpression_return);

            Enter_synpred169_PNTree_fragment();
            EnterRule("synpred169_PNTree_fragment", 226);
            TraceIn("synpred169_PNTree_fragment", 226);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:4: (name= ID '?' ( '[' guard= conditionalOrExpression ']' )? expression ( '.' expression )* '->' channelExpr )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:4: name= ID '?' ( '[' guard= conditionalOrExpression ']' )? expression ( '.' expression )* '->' channelExpr
                {
                    DebugLocation(724, 8);
                    name = (IToken)Match(input, ID, Follow._ID_in_synpred169_PNTree3994); if (state.failed) return;
                    DebugLocation(724, 12);
                    Match(input, 77, Follow._77_in_synpred169_PNTree3996); if (state.failed) return;
                    DebugLocation(724, 16);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:16: ( '[' guard= conditionalOrExpression ']' )?
                    int alt190 = 2;
                    try
                    {
                        DebugEnterSubRule(190);
                        try
                        {
                            DebugEnterDecision(190, decisionCanBacktrack[190]);
                            int LA190_0 = input.LA(1);

                            if ((LA190_0 == 108))
                            {
                                alt190 = 1;
                            }
                        }
                        finally { DebugExitDecision(190); }
                        switch (alt190)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:17: '[' guard= conditionalOrExpression ']'
                                {
                                    DebugLocation(724, 17);
                                    Match(input, 108, Follow._108_in_synpred169_PNTree3999); if (state.failed) return;
                                    DebugLocation(724, 26);
                                    PushFollow(Follow._conditionalOrExpression_in_synpred169_PNTree4003);
                                    guard = conditionalOrExpression();
                                    PopFollow();
                                    if (state.failed) return;
                                    DebugLocation(724, 51);
                                    Match(input, 109, Follow._109_in_synpred169_PNTree4005); if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(190); }

                    DebugLocation(724, 57);
                    PushFollow(Follow._expression_in_synpred169_PNTree4009);
                    expression();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(724, 68);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:68: ( '.' expression )*
                    try
                    {
                        DebugEnterSubRule(191);
                        while (true)
                        {
                            int alt191 = 2;
                            try
                            {
                                DebugEnterDecision(191, decisionCanBacktrack[191]);
                                int LA191_0 = input.LA(1);

                                if ((LA191_0 == 85))
                                {
                                    alt191 = 1;
                                }


                            }
                            finally { DebugExitDecision(191); }
                            switch (alt191)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:724:69: '.' expression
                                    {
                                        DebugLocation(724, 69);
                                        Match(input, 85, Follow._85_in_synpred169_PNTree4012); if (state.failed) return;
                                        DebugLocation(724, 73);
                                        PushFollow(Follow._expression_in_synpred169_PNTree4014);
                                        expression();
                                        PopFollow();
                                        if (state.failed) return;

                                    }
                                    break;

                                default:
                                    goto loop191;
                            }
                        }

                    loop191:
                        ;

                    }
                    finally { DebugExitSubRule(191); }

                    DebugLocation(724, 87);
                    Match(input, 81, Follow._81_in_synpred169_PNTree4019); if (state.failed) return;
                    DebugLocation(724, 92);
                    PushFollow(Follow._channelExpr_in_synpred169_PNTree4021);
                    channelExpr();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred169_PNTree_fragment", 226);
                LeaveRule("synpred169_PNTree_fragment", 226);
                Leave_synpred169_PNTree_fragment();
            }
        }
        // $ANTLR end synpred169_PNTree

        partial void Enter_synpred171_PNTree_fragment();
        partial void Leave_synpred171_PNTree_fragment();

        // $ANTLR start synpred171_PNTree
        public void synpred171_PNTree_fragment()
        {
            Enter_synpred171_PNTree_fragment();
            EnterRule("synpred171_PNTree_fragment", 228);
            TraceIn("synpred171_PNTree_fragment", 228);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:4: ( eventM ( block )? '->' channelExpr )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:4: eventM ( block )? '->' channelExpr
                {
                    DebugLocation(731, 4);
                    PushFollow(Follow._eventM_in_synpred171_PNTree4067);
                    eventM();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(731, 11);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:11: ( block )?
                    int alt192 = 2;
                    try
                    {
                        DebugEnterSubRule(192);
                        try
                        {
                            DebugEnterDecision(192, decisionCanBacktrack[192]);
                            int LA192_0 = input.LA(1);

                            if ((LA192_0 == 99))
                            {
                                alt192 = 1;
                            }
                        }
                        finally { DebugExitDecision(192); }
                        switch (alt192)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:731:12: block
                                {
                                    DebugLocation(731, 12);
                                    PushFollow(Follow._block_in_synpred171_PNTree4070);
                                    block();
                                    PopFollow();
                                    if (state.failed) return;

                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(192); }

                    DebugLocation(731, 20);
                    Match(input, 81, Follow._81_in_synpred171_PNTree4074); if (state.failed) return;
                    DebugLocation(731, 25);
                    PushFollow(Follow._channelExpr_in_synpred171_PNTree4076);
                    channelExpr();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred171_PNTree_fragment", 228);
                LeaveRule("synpred171_PNTree_fragment", 228);
                Leave_synpred171_PNTree_fragment();
            }
        }
        // $ANTLR end synpred171_PNTree

        partial void Enter_synpred174_PNTree_fragment();
        partial void Leave_synpred174_PNTree_fragment();

        // $ANTLR start synpred174_PNTree
        public void synpred174_PNTree_fragment()
        {
            Enter_synpred174_PNTree_fragment();
            EnterRule("synpred174_PNTree_fragment", 231);
            TraceIn("synpred174_PNTree_fragment", 231);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:733:4: ( '(' eventM ( ',' eventM )* ')' '->' channelExpr )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:733:4: '(' eventM ( ',' eventM )* ')' '->' channelExpr
                {
                    DebugLocation(733, 4);
                    Match(input, 72, Follow._72_in_synpred174_PNTree4114); if (state.failed) return;
                    DebugLocation(733, 8);
                    PushFollow(Follow._eventM_in_synpred174_PNTree4116);
                    eventM();
                    PopFollow();
                    if (state.failed) return;
                    DebugLocation(733, 15);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:733:15: ( ',' eventM )*
                    try
                    {
                        DebugEnterSubRule(193);
                        while (true)
                        {
                            int alt193 = 2;
                            try
                            {
                                DebugEnterDecision(193, decisionCanBacktrack[193]);
                                int LA193_0 = input.LA(1);

                                if ((LA193_0 == 97))
                                {
                                    alt193 = 1;
                                }


                            }
                            finally { DebugExitDecision(193); }
                            switch (alt193)
                            {
                                case 1:
                                    DebugEnterAlt(1);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:733:16: ',' eventM
                                    {
                                        DebugLocation(733, 16);
                                        Match(input, 97, Follow._97_in_synpred174_PNTree4119); if (state.failed) return;
                                        DebugLocation(733, 20);
                                        PushFollow(Follow._eventM_in_synpred174_PNTree4121);
                                        eventM();
                                        PopFollow();
                                        if (state.failed) return;

                                    }
                                    break;

                                default:
                                    goto loop193;
                            }
                        }

                    loop193:
                        ;

                    }
                    finally { DebugExitSubRule(193); }

                    DebugLocation(733, 29);
                    Match(input, 73, Follow._73_in_synpred174_PNTree4125); if (state.failed) return;
                    DebugLocation(733, 33);
                    Match(input, 81, Follow._81_in_synpred174_PNTree4127); if (state.failed) return;
                    DebugLocation(733, 38);
                    PushFollow(Follow._channelExpr_in_synpred174_PNTree4129);
                    channelExpr();
                    PopFollow();
                    if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred174_PNTree_fragment", 231);
                LeaveRule("synpred174_PNTree_fragment", 231);
                Leave_synpred174_PNTree_fragment();
            }
        }
        // $ANTLR end synpred174_PNTree

        partial void Enter_synpred187_PNTree_fragment();
        partial void Leave_synpred187_PNTree_fragment();

        // $ANTLR start synpred187_PNTree
        public void synpred187_PNTree_fragment()
        {
            Enter_synpred187_PNTree_fragment();
            EnterRule("synpred187_PNTree_fragment", 244);
            TraceIn("synpred187_PNTree_fragment", 244);
            try
            {
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:10: ( '(' ( expression ( ',' expression )* )? ')' )
                DebugEnterAlt(1);
                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:10: '(' ( expression ( ',' expression )* )? ')'
                {
                    DebugLocation(782, 10);
                    Match(input, 72, Follow._72_in_synpred187_PNTree4511); if (state.failed) return;
                    DebugLocation(782, 14);
                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:14: ( expression ( ',' expression )* )?
                    int alt200 = 2;
                    try
                    {
                        DebugEnterSubRule(200);
                        try
                        {
                            DebugEnterDecision(200, decisionCanBacktrack[200]);
                            int LA200_0 = input.LA(1);

                            if (((LA200_0 >= ID && LA200_0 <= INT) || LA200_0 == 72 || LA200_0 == 76 || (LA200_0 >= 102 && LA200_0 <= 104) || LA200_0 == 120 || (LA200_0 >= 126 && LA200_0 <= 127)))
                            {
                                alt200 = 1;
                            }
                        }
                        finally { DebugExitDecision(200); }
                        switch (alt200)
                        {
                            case 1:
                                DebugEnterAlt(1);
                                // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:15: expression ( ',' expression )*
                                {
                                    DebugLocation(782, 15);
                                    PushFollow(Follow._expression_in_synpred187_PNTree4514);
                                    expression();
                                    PopFollow();
                                    if (state.failed) return;
                                    DebugLocation(782, 26);
                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:26: ( ',' expression )*
                                    try
                                    {
                                        DebugEnterSubRule(199);
                                        while (true)
                                        {
                                            int alt199 = 2;
                                            try
                                            {
                                                DebugEnterDecision(199, decisionCanBacktrack[199]);
                                                int LA199_0 = input.LA(1);

                                                if ((LA199_0 == 97))
                                                {
                                                    alt199 = 1;
                                                }


                                            }
                                            finally { DebugExitDecision(199); }
                                            switch (alt199)
                                            {
                                                case 1:
                                                    DebugEnterAlt(1);
                                                    // E:\\Dropbox\\PAT\\pat-tl\\PAT.Module.PN\\LTS\\PNTree.g:782:27: ',' expression
                                                    {
                                                        DebugLocation(782, 27);
                                                        Match(input, 97, Follow._97_in_synpred187_PNTree4517); if (state.failed) return;
                                                        DebugLocation(782, 31);
                                                        PushFollow(Follow._expression_in_synpred187_PNTree4519);
                                                        expression();
                                                        PopFollow();
                                                        if (state.failed) return;

                                                    }
                                                    break;

                                                default:
                                                    goto loop199;
                                            }
                                        }

                                    loop199:
                                        ;

                                    }
                                    finally { DebugExitSubRule(199); }


                                }
                                break;

                        }
                    }
                    finally { DebugExitSubRule(200); }

                    DebugLocation(782, 48);
                    Match(input, 73, Follow._73_in_synpred187_PNTree4527); if (state.failed) return;

                }

            }
            finally
            {
                TraceOut("synpred187_PNTree_fragment", 244);
                LeaveRule("synpred187_PNTree_fragment", 244);
                Leave_synpred187_PNTree_fragment();
            }
        }
        // $ANTLR end synpred187_PNTree
        #endregion Rules

        #region Synpreds
        private bool EvaluatePredicate(System.Action fragment)
        {
            bool success = false;
            state.backtracking++;
            try
            {
                DebugBeginBacktrack(state.backtracking);
                int start = input.Mark();
                try
                {
                    fragment();
                }
                catch (RecognitionException re)
                {
                    System.Console.Error.WriteLine("impossible: " + re);
                }
                success = !state.failed;
                input.Rewind(start);
            }
            finally { DebugEndBacktrack(state.backtracking, success); }
            state.backtracking--;
            state.failed = false;
            return success;
        }
        #endregion Synpreds


        #region DFA
        DFA6 dfa6;
        DFA15 dfa15;
        DFA14 dfa14;
        DFA18 dfa18;
        DFA40 dfa40;
        DFA49 dfa49;
        DFA107 dfa107;
        DFA112 dfa112;
        DFA115 dfa115;
        DFA127 dfa127;

        protected override void InitDFAs()
        {
            base.InitDFAs();
            dfa6 = new DFA6(this);
            dfa15 = new DFA15(this, SpecialStateTransition15);
            dfa14 = new DFA14(this, SpecialStateTransition14);
            dfa18 = new DFA18(this, SpecialStateTransition18);
            dfa40 = new DFA40(this, SpecialStateTransition40);
            dfa49 = new DFA49(this, SpecialStateTransition49);
            dfa107 = new DFA107(this);
            dfa112 = new DFA112(this, SpecialStateTransition112);
            dfa115 = new DFA115(this, SpecialStateTransition115);
            dfa127 = new DFA127(this, SpecialStateTransition127);
        }

        private class DFA6 : DFA
        {
            private const string DFA6_eotS =
                "\xB\xFFFF";
            private const string DFA6_eofS =
                "\xB\xFFFF";
            private const string DFA6_minS =
                "\x1\x47\x6\xFFFF\x1\x3D\x3\xFFFF";
            private const string DFA6_maxS =
                "\x1\x5B\x6\xFFFF\x1\x5D\x3\xFFFF";
            private const string DFA6_acceptS =
                "\x1\xFFFF\x1\x1\x1\x2\x1\x3\x1\x4\x1\x5\x1\x6\x1\xFFFF\x1\x8\x1\x9\x1" +
                "\x7";
            private const string DFA6_specialS =
                "\xB\xFFFF}>";
            private static readonly string[] DFA6_transitionS =
			    {
				    "\x1\x1\xE\xFFFF\x1\x2\x1\x3\x1\x4\x1\x5\x1\x6\x1\x7",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "\x1\xA\x1E\xFFFF\x1\x8\x1\x9",
				    "",
				    "",
				    ""
			    };

            private static readonly short[] DFA6_eot = DFA.UnpackEncodedString(DFA6_eotS);
            private static readonly short[] DFA6_eof = DFA.UnpackEncodedString(DFA6_eofS);
            private static readonly char[] DFA6_min = DFA.UnpackEncodedStringToUnsignedChars(DFA6_minS);
            private static readonly char[] DFA6_max = DFA.UnpackEncodedStringToUnsignedChars(DFA6_maxS);
            private static readonly short[] DFA6_accept = DFA.UnpackEncodedString(DFA6_acceptS);
            private static readonly short[] DFA6_special = DFA.UnpackEncodedString(DFA6_specialS);
            private static readonly short[][] DFA6_transition;

            static DFA6()
            {
                int numStates = DFA6_transitionS.Length;
                DFA6_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA6_transition[i] = DFA.UnpackEncodedString(DFA6_transitionS[i]);
                }
            }

            public DFA6(BaseRecognizer recognizer)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 6;
                this.eot = DFA6_eot;
                this.eof = DFA6_eof;
                this.min = DFA6_min;
                this.max = DFA6_max;
                this.accept = DFA6_accept;
                this.special = DFA6_special;
                this.transition = DFA6_transition;
            }

            public override string Description { get { return "271:2: ( ( '|=' ( '(' | ')' | '[]' | '<>' | ID | STRING | '!' | '?' | '&&' | '||' | 'tau' | '->' | '<->' | '/\\\\' | '\\\\/' | '.' | INT )+ ) | 'deadlockfree' | 'nonterminating' | 'divergencefree' | 'deterministic' | 'reaches' ID ( withClause )? | 'refines' definitionRef | 'refines' '<F>' definitionRef | 'refines' '<FD>' definitionRef )"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private class DFA15 : DFA
        {
            private const string DFA15_eotS =
                "\x10\xFFFF";
            private const string DFA15_eofS =
                "\x10\xFFFF";
            private const string DFA15_minS =
                "\x1\x42\x1\x65\x1\xFFFF\x3\x3D\x3\x44\x1\xFFFF\x1\x44\x3\x0\x2\xFFFF";
            private const string DFA15_maxS =
                "\x1\x69\x1\x65\x1\xFFFF\x1\x3D\x2\x7F\x3\x7D\x1\xFFFF\x1\x7D\x3\x0\x2" +
                "\xFFFF";
            private const string DFA15_acceptS =
                "\x2\xFFFF\x1\x3\x6\xFFFF\x1\x4\x4\xFFFF\x1\x1\x1\x2";
            private const string DFA15_specialS =
                "\xB\xFFFF\x1\x2\x1\x0\x1\x1\x2\xFFFF}>";
            private static readonly string[] DFA15_transitionS =
			    {
				    "\x1\x1\x26\xFFFF\x1\x2",
				    "\x1\x3",
				    "",
				    "\x1\x4",
				    "\x1\x9\x1\x6\x9\xFFFF\x1\x9\x3\xFFFF\x1\x9\x16\xFFFF\x1\x9\x2\xFFFF"+
				    "\x1\x5\x1\x7\x1\x8\xF\xFFFF\x1\x9\x5\xFFFF\x2\x9",
				    "\x1\x9\x1\xA\x9\xFFFF\x1\x9\x3\xFFFF\x1\x9\x19\xFFFF\x3\x9\xF\xFFFF"+
				    "\x1\x9\x5\xFFFF\x2\x9",
				    "\x1\xB\x9\xFFFF\x2\x9\x16\xFFFF\x1\x9\x4\xFFFF\x1\x9\x2\xFFFF\x10"+
				    "\x9",
				    "\x1\xC\x9\xFFFF\x2\x9\x16\xFFFF\x1\x9\x4\xFFFF\x1\x9\x2\xFFFF\x10"+
				    "\x9",
				    "\x1\xD\x9\xFFFF\x2\x9\x16\xFFFF\x1\x9\x4\xFFFF\x1\x9\x2\xFFFF\x10"+
				    "\x9",
				    "",
				    "\x1\xB\x9\xFFFF\x2\x9\x16\xFFFF\x1\x9\x4\xFFFF\x1\x9\x2\xFFFF\x10"+
				    "\x9",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "",
				    ""
			    };

            private static readonly short[] DFA15_eot = DFA.UnpackEncodedString(DFA15_eotS);
            private static readonly short[] DFA15_eof = DFA.UnpackEncodedString(DFA15_eofS);
            private static readonly char[] DFA15_min = DFA.UnpackEncodedStringToUnsignedChars(DFA15_minS);
            private static readonly char[] DFA15_max = DFA.UnpackEncodedStringToUnsignedChars(DFA15_maxS);
            private static readonly short[] DFA15_accept = DFA.UnpackEncodedString(DFA15_acceptS);
            private static readonly short[] DFA15_special = DFA.UnpackEncodedString(DFA15_specialS);
            private static readonly short[][] DFA15_transition;

            static DFA15()
            {
                int numStates = DFA15_transitionS.Length;
                DFA15_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA15_transition[i] = DFA.UnpackEncodedString(DFA15_transitionS[i]);
                }
            }

            public DFA15(BaseRecognizer recognizer, SpecialStateTransitionHandler specialStateTransition)
                : base(specialStateTransition)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 15;
                this.eot = DFA15_eot;
                this.eof = DFA15_eof;
                this.min = DFA15_min;
                this.max = DFA15_max;
                this.accept = DFA15_accept;
                this.special = DFA15_special;
                this.transition = DFA15_transition;
            }

            public override string Description { get { return "306:1: define : ( '#' 'define' ID ( '-' )? INT ';' -> ^( DEFINE_CONSTANT_NODE ID INT ( '-' )? ) | '#' 'define' ID ( 'true' ';' -> ^( DEFINE_CONSTANT_NODE ID 'true' ) | 'false' ';' -> ^( DEFINE_CONSTANT_NODE ID 'false' ) ) | 'enum' '{' a= ID ( ',' b= ID )* '}' ';' -> ^( DEFINE_CONSTANT_NODE ( ID )+ ) | '#' 'define' ID ( dparameter )? dstatement ';' -> ^( DEFINE_NODE ID ( dparameter )? dstatement ) );"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private int SpecialStateTransition15(DFA dfa, int s, IIntStream _input)
        {
            ITokenStream input = (ITokenStream)_input;
            int _s = s;
            switch (s)
            {
                case 0:
                    int LA15_12 = input.LA(1);


                    int index15_12 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred42_PNTree_fragment))) { s = 15; }

                    else if ((true)) { s = 9; }


                    input.Seek(index15_12);
                    if (s >= 0) return s;
                    break;
                case 1:
                    int LA15_13 = input.LA(1);


                    int index15_13 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred42_PNTree_fragment))) { s = 15; }

                    else if ((true)) { s = 9; }


                    input.Seek(index15_13);
                    if (s >= 0) return s;
                    break;
                case 2:
                    int LA15_11 = input.LA(1);


                    int index15_11 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred40_PNTree_fragment))) { s = 14; }

                    else if ((true)) { s = 9; }


                    input.Seek(index15_11);
                    if (s >= 0) return s;
                    break;
            }
            if (state.backtracking > 0) { state.failed = true; return -1; }
            NoViableAltException nvae = new NoViableAltException(dfa.Description, 15, _s, input);
            dfa.Error(nvae);
            throw nvae;
        }
        private class DFA14 : DFA
        {
            private const string DFA14_eotS =
                "\xD\xFFFF";
            private const string DFA14_eofS =
                "\xD\xFFFF";
            private const string DFA14_minS =
                "\x1\x3D\x1\x0\xB\xFFFF";
            private const string DFA14_maxS =
                "\x1\x7F\x1\x0\xB\xFFFF";
            private const string DFA14_acceptS =
                "\x2\xFFFF\x1\x2\x9\xFFFF\x1\x1";
            private const string DFA14_specialS =
                "\x1\xFFFF\x1\x0\xB\xFFFF}>";
            private static readonly string[] DFA14_transitionS =
			    {
				    "\x2\x2\x9\xFFFF\x1\x1\x3\xFFFF\x1\x2\x16\xFFFF\x1\x2\x2\xFFFF\x3\x2"+
				    "\xF\xFFFF\x1\x2\x5\xFFFF\x2\x2",
				    "\x1\xFFFF",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    ""
			    };

            private static readonly short[] DFA14_eot = DFA.UnpackEncodedString(DFA14_eotS);
            private static readonly short[] DFA14_eof = DFA.UnpackEncodedString(DFA14_eofS);
            private static readonly char[] DFA14_min = DFA.UnpackEncodedStringToUnsignedChars(DFA14_minS);
            private static readonly char[] DFA14_max = DFA.UnpackEncodedStringToUnsignedChars(DFA14_maxS);
            private static readonly short[] DFA14_accept = DFA.UnpackEncodedString(DFA14_acceptS);
            private static readonly short[] DFA14_special = DFA.UnpackEncodedString(DFA14_specialS);
            private static readonly short[][] DFA14_transition;

            static DFA14()
            {
                int numStates = DFA14_transitionS.Length;
                DFA14_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA14_transition[i] = DFA.UnpackEncodedString(DFA14_transitionS[i]);
                }
            }

            public DFA14(BaseRecognizer recognizer, SpecialStateTransitionHandler specialStateTransition)
                : base(specialStateTransition)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 14;
                this.eot = DFA14_eot;
                this.eof = DFA14_eof;
                this.min = DFA14_min;
                this.max = DFA14_max;
                this.accept = DFA14_accept;
                this.special = DFA14_special;
                this.transition = DFA14_transition;
            }

            public override string Description { get { return "314:54: ( dparameter )?"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private int SpecialStateTransition14(DFA dfa, int s, IIntStream _input)
        {
            ITokenStream input = (ITokenStream)_input;
            int _s = s;
            switch (s)
            {
                case 0:
                    int LA14_1 = input.LA(1);


                    int index14_1 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred45_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 2; }


                    input.Seek(index14_1);
                    if (s >= 0) return s;
                    break;
            }
            if (state.backtracking > 0) { state.failed = true; return -1; }
            NoViableAltException nvae = new NoViableAltException(dfa.Description, 14, _s, input);
            dfa.Error(nvae);
            throw nvae;
        }
        private class DFA18 : DFA
        {
            private const string DFA18_eotS =
                "\x11\xFFFF";
            private const string DFA18_eofS =
                "\x11\xFFFF";
            private const string DFA18_minS =
                "\x1\x3D\xA\x0\x6\xFFFF";
            private const string DFA18_maxS =
                "\x1\x85\xA\x0\x6\xFFFF";
            private const string DFA18_acceptS =
                "\xB\xFFFF\x1\x2\x1\x1\x4\xFFFF";
            private const string DFA18_specialS =
                "\x1\xFFFF\x1\x0\x1\x1\x1\x2\x1\x3\x1\x4\x1\x5\x1\x6\x1\x7\x1\x8\x1\x9" +
                "\x6\xFFFF}>";
            private static readonly string[] DFA18_transitionS =
			    {
				    "\x1\x9\x1\x4\x5\xFFFF\x1\xC\x3\xFFFF\x1\xA\x3\xFFFF\x1\x3\x16\xFFFF"+
				    "\x1\xC\x1\xB\x1\xFFFF\x1\x2\x1\x5\x1\x6\x1\xFFFF\x1\xC\xD\xFFFF\x1\x1"+
				    "\x5\xFFFF\x1\x7\x1\x8\x3\xFFFF\x1\xC\x1\xFFFF\x1\xC",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "",
				    "",
				    "",
				    "",
				    "",
				    ""
			    };

            private static readonly short[] DFA18_eot = DFA.UnpackEncodedString(DFA18_eotS);
            private static readonly short[] DFA18_eof = DFA.UnpackEncodedString(DFA18_eofS);
            private static readonly char[] DFA18_min = DFA.UnpackEncodedStringToUnsignedChars(DFA18_minS);
            private static readonly char[] DFA18_max = DFA.UnpackEncodedStringToUnsignedChars(DFA18_maxS);
            private static readonly short[] DFA18_accept = DFA.UnpackEncodedString(DFA18_acceptS);
            private static readonly short[] DFA18_special = DFA.UnpackEncodedString(DFA18_specialS);
            private static readonly short[][] DFA18_transition;

            static DFA18()
            {
                int numStates = DFA18_transitionS.Length;
                DFA18_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA18_transition[i] = DFA.UnpackEncodedString(DFA18_transitionS[i]);
                }
            }

            public DFA18(BaseRecognizer recognizer, SpecialStateTransitionHandler specialStateTransition)
                : base(specialStateTransition)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 18;
                this.eot = DFA18_eot;
                this.eof = DFA18_eof;
                this.min = DFA18_min;
                this.max = DFA18_max;
                this.accept = DFA18_accept;
                this.special = DFA18_special;
                this.transition = DFA18_transition;
            }

            public override string Description { get { return "()* loopback of 337:10: (s= statement )*"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private int SpecialStateTransition18(DFA dfa, int s, IIntStream _input)
        {
            ITokenStream input = (ITokenStream)_input;
            int _s = s;
            switch (s)
            {
                case 0:
                    int LA18_1 = input.LA(1);


                    int index18_1 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_1);
                    if (s >= 0) return s;
                    break;
                case 1:
                    int LA18_2 = input.LA(1);


                    int index18_2 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_2);
                    if (s >= 0) return s;
                    break;
                case 2:
                    int LA18_3 = input.LA(1);


                    int index18_3 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_3);
                    if (s >= 0) return s;
                    break;
                case 3:
                    int LA18_4 = input.LA(1);


                    int index18_4 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_4);
                    if (s >= 0) return s;
                    break;
                case 4:
                    int LA18_5 = input.LA(1);


                    int index18_5 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_5);
                    if (s >= 0) return s;
                    break;
                case 5:
                    int LA18_6 = input.LA(1);


                    int index18_6 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_6);
                    if (s >= 0) return s;
                    break;
                case 6:
                    int LA18_7 = input.LA(1);


                    int index18_7 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_7);
                    if (s >= 0) return s;
                    break;
                case 7:
                    int LA18_8 = input.LA(1);


                    int index18_8 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_8);
                    if (s >= 0) return s;
                    break;
                case 8:
                    int LA18_9 = input.LA(1);


                    int index18_9 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_9);
                    if (s >= 0) return s;
                    break;
                case 9:
                    int LA18_10 = input.LA(1);


                    int index18_10 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred48_PNTree_fragment))) { s = 12; }

                    else if ((true)) { s = 11; }


                    input.Seek(index18_10);
                    if (s >= 0) return s;
                    break;
            }
            if (state.backtracking > 0) { state.failed = true; return -1; }
            NoViableAltException nvae = new NoViableAltException(dfa.Description, 18, _s, input);
            dfa.Error(nvae);
            throw nvae;
        }
        private class DFA40 : DFA
        {
            private const string DFA40_eotS =
                "\xD\xFFFF";
            private const string DFA40_eofS =
                "\xD\xFFFF";
            private const string DFA40_minS =
                "\x1\x3D\x3\xFFFF\x7\x0\x2\xFFFF";
            private const string DFA40_maxS =
                "\x1\x7F\x3\xFFFF\x7\x0\x2\xFFFF";
            private const string DFA40_acceptS =
                "\x1\xFFFF\x1\x1\x1\x2\x1\x3\x7\xFFFF\x1\x4\x1\x5";
            private const string DFA40_specialS =
                "\x4\xFFFF\x1\x0\x1\x1\x1\x2\x1\x3\x1\x4\x1\x5\x1\x6\x2\xFFFF}>";
            private static readonly string[] DFA40_transitionS =
			    {
				    "\x1\x9\x1\x4\x9\xFFFF\x1\xA\x3\xFFFF\x1\x3\x19\xFFFF\x1\x2\x1\x5\x1"+
				    "\x6\xF\xFFFF\x1\x1\x5\xFFFF\x1\x7\x1\x8",
				    "",
				    "",
				    "",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "\x1\xFFFF",
				    "",
				    ""
			    };

            private static readonly short[] DFA40_eot = DFA.UnpackEncodedString(DFA40_eotS);
            private static readonly short[] DFA40_eof = DFA.UnpackEncodedString(DFA40_eofS);
            private static readonly char[] DFA40_min = DFA.UnpackEncodedStringToUnsignedChars(DFA40_minS);
            private static readonly char[] DFA40_max = DFA.UnpackEncodedStringToUnsignedChars(DFA40_maxS);
            private static readonly short[] DFA40_accept = DFA.UnpackEncodedString(DFA40_acceptS);
            private static readonly short[] DFA40_special = DFA.UnpackEncodedString(DFA40_specialS);
            private static readonly short[][] DFA40_transition;

            static DFA40()
            {
                int numStates = DFA40_transitionS.Length;
                DFA40_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA40_transition[i] = DFA.UnpackEncodedString(DFA40_transitionS[i]);
                }
            }

            public DFA40(BaseRecognizer recognizer, SpecialStateTransitionHandler specialStateTransition)
                : base(specialStateTransition)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 40;
                this.eot = DFA40_eot;
                this.eof = DFA40_eof;
                this.min = DFA40_min;
                this.max = DFA40_max;
                this.accept = DFA40_accept;
                this.special = DFA40_special;
                this.transition = DFA40_transition;
            }

            public override string Description { get { return "428:1: unaryExpression : ( '+' unaryExpression -> unaryExpression | '-' unaryExpression -> ^( UNARY_NODE unaryExpression ) | '!' unaryExpressionNotPlusMinus | unaryExpressionNotPlusMinus (op= '++' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '+' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) | op= '--' -> ^( ASSIGNMENT_NODE unaryExpressionNotPlusMinus ^( '-' unaryExpressionNotPlusMinus INT[$op, \"1\"] ) ) ) | unaryExpressionNotPlusMinus );"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private int SpecialStateTransition40(DFA dfa, int s, IIntStream _input)
        {
            ITokenStream input = (ITokenStream)_input;
            int _s = s;
            switch (s)
            {
                case 0:
                    int LA40_4 = input.LA(1);


                    int index40_4 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred82_PNTree_fragment))) { s = 11; }

                    else if ((true)) { s = 12; }


                    input.Seek(index40_4);
                    if (s >= 0) return s;
                    break;
                case 1:
                    int LA40_5 = input.LA(1);


                    int index40_5 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred82_PNTree_fragment))) { s = 11; }

                    else if ((true)) { s = 12; }


                    input.Seek(index40_5);
                    if (s >= 0) return s;
                    break;
                case 2:
                    int LA40_6 = input.LA(1);


                    int index40_6 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred82_PNTree_fragment))) { s = 11; }

                    else if ((true)) { s = 12; }


                    input.Seek(index40_6);
                    if (s >= 0) return s;
                    break;
                case 3:
                    int LA40_7 = input.LA(1);


                    int index40_7 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred82_PNTree_fragment))) { s = 11; }

                    else if ((true)) { s = 12; }


                    input.Seek(index40_7);
                    if (s >= 0) return s;
                    break;
                case 4:
                    int LA40_8 = input.LA(1);


                    int index40_8 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred82_PNTree_fragment))) { s = 11; }

                    else if ((true)) { s = 12; }


                    input.Seek(index40_8);
                    if (s >= 0) return s;
                    break;
                case 5:
                    int LA40_9 = input.LA(1);


                    int index40_9 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred82_PNTree_fragment))) { s = 11; }

                    else if ((true)) { s = 12; }


                    input.Seek(index40_9);
                    if (s >= 0) return s;
                    break;
                case 6:
                    int LA40_10 = input.LA(1);


                    int index40_10 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred82_PNTree_fragment))) { s = 11; }

                    else if ((true)) { s = 12; }


                    input.Seek(index40_10);
                    if (s >= 0) return s;
                    break;
            }
            if (state.backtracking > 0) { state.failed = true; return -1; }
            NoViableAltException nvae = new NoViableAltException(dfa.Description, 40, _s, input);
            dfa.Error(nvae);
            throw nvae;
        }
        private class DFA49 : DFA
        {
            private const string DFA49_eotS =
                "\xC\xFFFF";
            private const string DFA49_eofS =
                "\xC\xFFFF";
            private const string DFA49_minS =
                "\x1\x3D\x5\xFFFF\x1\x0\x5\xFFFF";
            private const string DFA49_maxS =
                "\x1\x7F\x5\xFFFF\x1\x0\x5\xFFFF";
            private const string DFA49_acceptS =
                "\x1\xFFFF\x1\x1\x1\x2\x1\x3\x1\x4\x1\x5\x1\xFFFF\x1\x9\x1\x6\x1\x7\x1" +
                "\x8\x1\xA";
            private const string DFA49_specialS =
                "\x6\xFFFF\x1\x0\x5\xFFFF}>";
            private static readonly string[] DFA49_transitionS =
			    {
				    "\x1\x6\x1\x1\x9\xFFFF\x1\x7\x1E\xFFFF\x1\x2\x1\x3\x15\xFFFF\x1\x4\x1"+
				    "\x5",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "\x1\xFFFF",
				    "",
				    "",
				    "",
				    "",
				    ""
			    };

            private static readonly short[] DFA49_eot = DFA.UnpackEncodedString(DFA49_eotS);
            private static readonly short[] DFA49_eof = DFA.UnpackEncodedString(DFA49_eofS);
            private static readonly char[] DFA49_min = DFA.UnpackEncodedStringToUnsignedChars(DFA49_minS);
            private static readonly char[] DFA49_max = DFA.UnpackEncodedStringToUnsignedChars(DFA49_maxS);
            private static readonly short[] DFA49_accept = DFA.UnpackEncodedString(DFA49_acceptS);
            private static readonly short[] DFA49_special = DFA.UnpackEncodedString(DFA49_specialS);
            private static readonly short[][] DFA49_transition;

            static DFA49()
            {
                int numStates = DFA49_transitionS.Length;
                DFA49_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA49_transition[i] = DFA.UnpackEncodedString(DFA49_transitionS[i]);
                }
            }

            public DFA49(BaseRecognizer recognizer, SpecialStateTransitionHandler specialStateTransition)
                : base(specialStateTransition)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 49;
                this.eot = DFA49_eot;
                this.eof = DFA49_eof;
                this.min = DFA49_min;
                this.max = DFA49_max;
                this.accept = DFA49_accept;
                this.special = DFA49_special;
                this.transition = DFA49_transition;
            }

            public override string Description { get { return "447:1: unaryExpressionNotPlusMinus : ( INT | 'true' | 'false' | 'call' '(' ID ( ',' conditionalOrExpression )* ')' -> ^( CALL_NODE ID ( conditionalOrExpression )* ) | 'new' ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' -> ^( 'new' ID ( conditionalOrExpression )* ) | var= ID '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' -> ^( CLASS_CALL_NODE $var $method ( conditionalOrExpression )* ) | a1= arrayExpression '.' method= ID '(' ( conditionalOrExpression ( ',' conditionalOrExpression )* )? ')' -> ^( CLASS_CALL_INSTANCE_NODE $a1 $method ( conditionalOrExpression )* ) | arrayExpression | '(' conditionalOrExpression ')' -> conditionalOrExpression | ID -> ^( VAR_NODE ID ) );"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private int SpecialStateTransition49(DFA dfa, int s, IIntStream _input)
        {
            ITokenStream input = (ITokenStream)_input;
            int _s = s;
            switch (s)
            {
                case 0:
                    int LA49_6 = input.LA(1);


                    int index49_6 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred94_PNTree_fragment))) { s = 8; }

                    else if ((EvaluatePredicate(synpred97_PNTree_fragment))) { s = 9; }

                    else if ((EvaluatePredicate(synpred98_PNTree_fragment))) { s = 10; }

                    else if ((true)) { s = 11; }


                    input.Seek(index49_6);
                    if (s >= 0) return s;
                    break;
            }
            if (state.backtracking > 0) { state.failed = true; return -1; }
            NoViableAltException nvae = new NoViableAltException(dfa.Description, 49, _s, input);
            dfa.Error(nvae);
            throw nvae;
        }
        private class DFA107 : DFA
        {
            private const string DFA107_eotS =
                "\xB\xFFFF";
            private const string DFA107_eofS =
                "\x1\x1\x1\xFFFF\x1\x1\x1\x4\x3\xFFFF\x1\x4\x1\xFFFF\x1\x4\x1\xFFFF";
            private const string DFA107_minS =
                "\x1\x3D\x1\xFFFF\x2\x3D\x1\xFFFF\x1\x3D\x1\x49\x3\x3D\x1\x49";
            private const string DFA107_maxS =
                "\x1\x91\x1\xFFFF\x1\x96\x1\x91\x1\xFFFF\x1\x7F\x1\x7D\x1\x91\x1\x7F" +
                "\x1\x91\x1\x7D";
            private const string DFA107_acceptS =
                "\x1\xFFFF\x1\x2\x2\xFFFF\x1\x1\x6\xFFFF";
            private const string DFA107_specialS =
                "\xB\xFFFF}>";
            private static readonly string[] DFA107_transitionS =
			    {
				    "\x2\x1\x5\xFFFF\x1\x2\x3\xFFFF\x5\x1\x2\xFFFF\x1\x1\x14\xFFFF\x1\x1"+
				    "\x1\xFFFF\x3\x1\xF\xFFFF\x1\x1\x5\xFFFF\x2\x1\xB\xFFFF\x1\x1\x1\xFFFF"+
				    "\x3\x1\x1\xFFFF\x1\x1",
				    "",
				    "\x1\x3\x4\xFFFF\x1\x1\x3\xFFFF\x1\x4\x1\xFFFF\x1\x4\x7\xFFFF\x1\x4"+
				    "\x12\xFFFF\x1\x4\x5\xFFFF\x2\x1\x1\xFFFF\x1\x4\x13\xFFFF\x1\x1\x2\xFFFF"+
				    "\x1\x4\x2\xFFFF\x1\x1\x9\xFFFF\x1\x4\x1\xFFFF\x5\x4",
				    "\x2\x4\x5\xFFFF\x1\x4\x3\xFFFF\x1\x5\x5\x4\x1\xFFFF\x1\x4\x1\xFFFF"+
				    "\x1\x4\x3\xFFFF\x1\x4\xD\xFFFF\x2\x4\x1\xFFFF\x3\x4\x2\xFFFF\x1\x1\xC"+
				    "\xFFFF\x1\x4\x5\xFFFF\x2\x4\xB\xFFFF\x1\x4\x1\xFFFF\x3\x4\x1\xFFFF\x1"+
				    "\x4",
				    "",
				    "\x1\x6\x1\x4\x9\xFFFF\x1\x4\x1\x7\x2\xFFFF\x1\x4\x19\xFFFF\x3\x4\xF"+
				    "\xFFFF\x1\x4\x5\xFFFF\x2\x4",
				    "\x1\x9\x4\xFFFF\x2\x4\x5\xFFFF\x1\x4\xB\xFFFF\x1\x8\x4\xFFFF\x1\x4"+
				    "\x4\xFFFF\x2\x4\x1\xFFFF\x10\x4",
				    "\x2\x4\x5\xFFFF\x1\x4\x3\xFFFF\x5\x4\x2\xFFFF\x1\x4\x14\xFFFF\x1\x4"+
				    "\x1\xFFFF\x3\x4\x2\xFFFF\x1\x1\xC\xFFFF\x1\x4\x5\xFFFF\x2\x4\xB\xFFFF"+
				    "\x1\x4\x1\xFFFF\x3\x4\x1\xFFFF\x1\x4",
				    "\x1\xA\x1\x4\x9\xFFFF\x1\x4\x3\xFFFF\x1\x4\x19\xFFFF\x3\x4\xF\xFFFF"+
				    "\x1\x4\x5\xFFFF\x2\x4",
				    "\x2\x4\x5\xFFFF\x1\x4\x3\xFFFF\x5\x4\x1\xFFFF\x2\x4\x14\xFFFF\x1\x4"+
				    "\x1\xFFFF\x3\x4\x2\xFFFF\x1\x1\x2\xFFFF\x12\x4\x1\xFFFF\x1\x4\x9\xFFFF"+
				    "\x1\x4\x1\xFFFF\x3\x4\x1\xFFFF\x1\x4",
				    "\x1\x7\x4\xFFFF\x2\x4\x5\xFFFF\x1\x4\xB\xFFFF\x1\x8\x4\xFFFF\x1\x4"+
				    "\x4\xFFFF\x2\x4\x1\xFFFF\x10\x4"
			    };

            private static readonly short[] DFA107_eot = DFA.UnpackEncodedString(DFA107_eotS);
            private static readonly short[] DFA107_eof = DFA.UnpackEncodedString(DFA107_eofS);
            private static readonly char[] DFA107_min = DFA.UnpackEncodedStringToUnsignedChars(DFA107_minS);
            private static readonly char[] DFA107_max = DFA.UnpackEncodedStringToUnsignedChars(DFA107_maxS);
            private static readonly short[] DFA107_accept = DFA.UnpackEncodedString(DFA107_acceptS);
            private static readonly short[] DFA107_special = DFA.UnpackEncodedString(DFA107_specialS);
            private static readonly short[][] DFA107_transition;

            static DFA107()
            {
                int numStates = DFA107_transitionS.Length;
                DFA107_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA107_transition[i] = DFA.UnpackEncodedString(DFA107_transitionS[i]);
                }
            }

            public DFA107(BaseRecognizer recognizer)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 107;
                this.eot = DFA107_eot;
                this.eof = DFA107_eof;
                this.min = DFA107_min;
                this.max = DFA107_max;
                this.accept = DFA107_accept;
                this.special = DFA107_special;
                this.transition = DFA107_transition;
            }

            public override string Description { get { return "()* loopback of 708:14: ( ';' guardExpr )*"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private class DFA112 : DFA
        {
            private const string DFA112_eotS =
                "\xF\xFFFF";
            private const string DFA112_eofS =
                "\xF\xFFFF";
            private const string DFA112_minS =
                "\x1\x3D\x1\x0\xD\xFFFF";
            private const string DFA112_maxS =
                "\x1\x96\x1\x0\xD\xFFFF";
            private const string DFA112_acceptS =
                "\x2\xFFFF\x1\x3\xA\xFFFF\x1\x1\x1\x2";
            private const string DFA112_specialS =
                "\x1\xFFFF\x1\x0\xD\xFFFF}>";
            private static readonly string[] DFA112_transitionS =
			    {
				    "\x1\x1\x8\xFFFF\x1\x2\x1\xFFFF\x1\x2\x7\xFFFF\x1\x2\x12\xFFFF\x1\x2"+
				    "\x1F\xFFFF\x1\x2\xC\xFFFF\x1\x2\x1\xFFFF\x5\x2",
				    "\x1\xFFFF",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    ""
			    };

            private static readonly short[] DFA112_eot = DFA.UnpackEncodedString(DFA112_eotS);
            private static readonly short[] DFA112_eof = DFA.UnpackEncodedString(DFA112_eofS);
            private static readonly char[] DFA112_min = DFA.UnpackEncodedStringToUnsignedChars(DFA112_minS);
            private static readonly char[] DFA112_max = DFA.UnpackEncodedStringToUnsignedChars(DFA112_maxS);
            private static readonly short[] DFA112_accept = DFA.UnpackEncodedString(DFA112_acceptS);
            private static readonly short[] DFA112_special = DFA.UnpackEncodedString(DFA112_specialS);
            private static readonly short[][] DFA112_transition;

            static DFA112()
            {
                int numStates = DFA112_transitionS.Length;
                DFA112_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA112_transition[i] = DFA.UnpackEncodedString(DFA112_transitionS[i]);
                }
            }

            public DFA112(BaseRecognizer recognizer, SpecialStateTransitionHandler specialStateTransition)
                : base(specialStateTransition)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 112;
                this.eot = DFA112_eot;
                this.eof = DFA112_eof;
                this.min = DFA112_min;
                this.max = DFA112_max;
                this.accept = DFA112_accept;
                this.special = DFA112_special;
                this.transition = DFA112_transition;
            }

            public override string Description { get { return "718:1: channelExpr : (name= ID '!' expression ( '.' expression )* '->' channelExpr -> ^( CHANNEL_OUT_NODE $name channelExpr ( expression )+ ) | name= ID '?' ( '[' guard= conditionalOrExpression ']' )? expression ( '.' expression )* '->' channelExpr -> ^( CHANNEL_IN_NODE $name ( expression )+ channelExpr ( $guard)? ) | eventExpr );"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private int SpecialStateTransition112(DFA dfa, int s, IIntStream _input)
        {
            ITokenStream input = (ITokenStream)_input;
            int _s = s;
            switch (s)
            {
                case 0:
                    int LA112_1 = input.LA(1);


                    int index112_1 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred166_PNTree_fragment))) { s = 13; }

                    else if ((EvaluatePredicate(synpred169_PNTree_fragment))) { s = 14; }

                    else if ((true)) { s = 2; }


                    input.Seek(index112_1);
                    if (s >= 0) return s;
                    break;
            }
            if (state.backtracking > 0) { state.failed = true; return -1; }
            NoViableAltException nvae = new NoViableAltException(dfa.Description, 112, _s, input);
            dfa.Error(nvae);
            throw nvae;
        }
        private class DFA115 : DFA
        {
            private const string DFA115_eotS =
                "\xE\xFFFF";
            private const string DFA115_eofS =
                "\xE\xFFFF";
            private const string DFA115_minS =
                "\x1\x3D\x1\x0\x2\xFFFF\x1\x0\x9\xFFFF";
            private const string DFA115_maxS =
                "\x1\x96\x1\x0\x2\xFFFF\x1\x0\x9\xFFFF";
            private const string DFA115_acceptS =
                "\x2\xFFFF\x1\x1\x1\x2\x1\xFFFF\x1\x4\x7\xFFFF\x1\x3";
            private const string DFA115_specialS =
                "\x1\xFFFF\x1\x0\x2\xFFFF\x1\x1\x9\xFFFF}>";
            private static readonly string[] DFA115_transitionS =
			    {
				    "\x1\x1\x8\xFFFF\x1\x5\x1\xFFFF\x1\x4\x7\xFFFF\x1\x2\x12\xFFFF\x1\x3"+
				    "\x1F\xFFFF\x1\x5\xC\xFFFF\x1\x5\x1\xFFFF\x5\x5",
				    "\x1\xFFFF",
				    "",
				    "",
				    "\x1\xFFFF",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    ""
			    };

            private static readonly short[] DFA115_eot = DFA.UnpackEncodedString(DFA115_eotS);
            private static readonly short[] DFA115_eof = DFA.UnpackEncodedString(DFA115_eofS);
            private static readonly char[] DFA115_min = DFA.UnpackEncodedStringToUnsignedChars(DFA115_minS);
            private static readonly char[] DFA115_max = DFA.UnpackEncodedStringToUnsignedChars(DFA115_maxS);
            private static readonly short[] DFA115_accept = DFA.UnpackEncodedString(DFA115_acceptS);
            private static readonly short[] DFA115_special = DFA.UnpackEncodedString(DFA115_specialS);
            private static readonly short[][] DFA115_transition;

            static DFA115()
            {
                int numStates = DFA115_transitionS.Length;
                DFA115_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA115_transition[i] = DFA.UnpackEncodedString(DFA115_transitionS[i]);
                }
            }

            public DFA115(BaseRecognizer recognizer, SpecialStateTransitionHandler specialStateTransition)
                : base(specialStateTransition)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 115;
                this.eot = DFA115_eot;
                this.eof = DFA115_eof;
                this.min = DFA115_min;
                this.max = DFA115_max;
                this.accept = DFA115_accept;
                this.special = DFA115_special;
                this.transition = DFA115_transition;
            }

            public override string Description { get { return "728:1: eventExpr : ( eventM ( block )? '->' channelExpr -> ^( EVENT_NODE eventM channelExpr ( block )? ) | block '->' channelExpr -> ^( EVENT_NODE channelExpr block ) | '(' eventM ( ',' eventM )* ')' '->' channelExpr -> ^( '[]' ( ^( EVENT_NODE eventM channelExpr ) )+ ) | caseExpr );"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private int SpecialStateTransition115(DFA dfa, int s, IIntStream _input)
        {
            ITokenStream input = (ITokenStream)_input;
            int _s = s;
            switch (s)
            {
                case 0:
                    int LA115_1 = input.LA(1);


                    int index115_1 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred171_PNTree_fragment))) { s = 2; }

                    else if ((true)) { s = 5; }


                    input.Seek(index115_1);
                    if (s >= 0) return s;
                    break;
                case 1:
                    int LA115_4 = input.LA(1);


                    int index115_4 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred174_PNTree_fragment))) { s = 13; }

                    else if ((true)) { s = 5; }


                    input.Seek(index115_4);
                    if (s >= 0) return s;
                    break;
            }
            if (state.backtracking > 0) { state.failed = true; return -1; }
            NoViableAltException nvae = new NoViableAltException(dfa.Description, 115, _s, input);
            dfa.Error(nvae);
            throw nvae;
        }
        private class DFA127 : DFA
        {
            private const string DFA127_eotS =
                "\x18\xFFFF";
            private const string DFA127_eofS =
                "\x1\x2\x17\xFFFF";
            private const string DFA127_minS =
                "\x1\x3D\x1\x0\x16\xFFFF";
            private const string DFA127_maxS =
                "\x1\x91\x1\x0\x16\xFFFF";
            private const string DFA127_acceptS =
                "\x2\xFFFF\x1\x2\x14\xFFFF\x1\x1";
            private const string DFA127_specialS =
                "\x1\xFFFF\x1\x0\x16\xFFFF}>";
            private static readonly string[] DFA127_transitionS =
			    {
				    "\x2\x2\x5\xFFFF\x1\x2\x3\xFFFF\x1\x1\x4\x2\x2\xFFFF\x1\x2\x14\xFFFF"+
				    "\x1\x2\x1\xFFFF\x3\x2\xF\xFFFF\x1\x2\x5\xFFFF\x2\x2\xB\xFFFF\x1\x2\x1"+
				    "\xFFFF\x3\x2\x1\xFFFF\x1\x2",
				    "\x1\xFFFF",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    "",
				    ""
			    };

            private static readonly short[] DFA127_eot = DFA.UnpackEncodedString(DFA127_eotS);
            private static readonly short[] DFA127_eof = DFA.UnpackEncodedString(DFA127_eofS);
            private static readonly char[] DFA127_min = DFA.UnpackEncodedStringToUnsignedChars(DFA127_minS);
            private static readonly char[] DFA127_max = DFA.UnpackEncodedStringToUnsignedChars(DFA127_maxS);
            private static readonly short[] DFA127_accept = DFA.UnpackEncodedString(DFA127_acceptS);
            private static readonly short[] DFA127_special = DFA.UnpackEncodedString(DFA127_specialS);
            private static readonly short[][] DFA127_transition;

            static DFA127()
            {
                int numStates = DFA127_transitionS.Length;
                DFA127_transition = new short[numStates][];
                for (int i = 0; i < numStates; i++)
                {
                    DFA127_transition[i] = DFA.UnpackEncodedString(DFA127_transitionS[i]);
                }
            }

            public DFA127(BaseRecognizer recognizer, SpecialStateTransitionHandler specialStateTransition)
                : base(specialStateTransition)
            {
                this.recognizer = recognizer;
                this.decisionNumber = 127;
                this.eot = DFA127_eot;
                this.eof = DFA127_eof;
                this.min = DFA127_min;
                this.max = DFA127_max;
                this.accept = DFA127_accept;
                this.special = DFA127_special;
                this.transition = DFA127_transition;
            }

            public override string Description { get { return "782:9: ( '(' ( expression ( ',' expression )* )? ')' )?"; } }

            public override void Error(NoViableAltException nvae)
            {
                DebugRecognitionException(nvae);
            }
        }

        private int SpecialStateTransition127(DFA dfa, int s, IIntStream _input)
        {
            ITokenStream input = (ITokenStream)_input;
            int _s = s;
            switch (s)
            {
                case 0:
                    int LA127_1 = input.LA(1);


                    int index127_1 = input.Index;
                    input.Rewind();
                    s = -1;
                    if ((EvaluatePredicate(synpred187_PNTree_fragment))) { s = 23; }

                    else if ((true)) { s = 2; }


                    input.Seek(index127_1);
                    if (s >= 0) return s;
                    break;
            }
            if (state.backtracking > 0) { state.failed = true; return -1; }
            NoViableAltException nvae = new NoViableAltException(dfa.Description, 127, _s, input);
            dfa.Error(nvae);
            throw nvae;
        }

        #endregion DFA

        #region Follow sets
        private static class Follow
        {
            public static readonly BitSet _specBody_in_specification315 = new BitSet(new ulong[] { 0x2000000000000002UL, 0x60000000004UL, 0x41UL });
            public static readonly BitSet _library_in_specBody333 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _letDefintion_in_specBody338 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _definition_in_specBody346 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _assertion_in_specBody352 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _alphabet_in_specBody358 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _define_in_specBody363 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _66_in_library386 = new BitSet(new ulong[] { 0x0UL, 0x8UL });
            public static readonly BitSet _67_in_library388 = new BitSet(new ulong[] { 0x1000000000000000UL });
            public static readonly BitSet _STRING_in_library390 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_library394 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _66_in_library407 = new BitSet(new ulong[] { 0x0UL, 0x20UL });
            public static readonly BitSet _69_in_library409 = new BitSet(new ulong[] { 0x1000000000000000UL });
            public static readonly BitSet _STRING_in_library411 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_library415 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _66_in_assertion457 = new BitSet(new ulong[] { 0x0UL, 0x40UL });
            public static readonly BitSet _70_in_assertion460 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _definitionRef_in_assertion462 = new BitSet(new ulong[] { 0x0UL, 0xFC00080UL });
            public static readonly BitSet _71_in_assertion472 = new BitSet(new ulong[] { 0x7000000000000000UL, 0x3FFF00UL });
            public static readonly BitSet _set_in_assertion474 = new BitSet(new ulong[] { 0x7000000000000000UL, 0x3FFF10UL });
            public static readonly BitSet _86_in_assertion552 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _87_in_assertion562 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _88_in_assertion575 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _89_in_assertion588 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _90_in_assertion596 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_assertion598 = new BitSet(new ulong[] { 0x0UL, 0x40000010UL });
            public static readonly BitSet _withClause_in_assertion600 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _91_in_assertion609 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _definitionRef_in_assertion611 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _91_in_assertion620 = new BitSet(new ulong[] { 0x0UL, 0x10000000UL });
            public static readonly BitSet _92_in_assertion622 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _definitionRef_in_assertion624 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _91_in_assertion633 = new BitSet(new ulong[] { 0x0UL, 0x20000000UL });
            public static readonly BitSet _93_in_assertion635 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _definitionRef_in_assertion637 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_assertion647 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _94_in_withClause671 = new BitSet(new ulong[] { 0x0UL, 0x180000000UL });
            public static readonly BitSet _set_in_withClause676 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_withClause684 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_withClause687 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_withClause689 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_definitionRef701 = new BitSet(new ulong[] { 0x2UL, 0x100UL });
            public static readonly BitSet _72_in_definitionRef704 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001300UL });
            public static readonly BitSet _expression_in_definitionRef707 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_definitionRef710 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_definitionRef712 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_definitionRef720 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _66_in_alphabet759 = new BitSet(new ulong[] { 0x0UL, 0x400000000UL });
            public static readonly BitSet _98_in_alphabet761 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_alphabet763 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_alphabet766 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _eventName_in_alphabet768 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _97_in_alphabet772 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _eventName_in_alphabet774 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _100_in_alphabet779 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_alphabet781 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _66_in_define816 = new BitSet(new ulong[] { 0x0UL, 0x2000000000UL });
            public static readonly BitSet _101_in_define818 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_define820 = new BitSet(new ulong[] { 0x4000000000000000UL, 0x4000000000UL });
            public static readonly BitSet _102_in_define824 = new BitSet(new ulong[] { 0x4000000000000000UL });
            public static readonly BitSet _INT_in_define827 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_define829 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _66_in_define847 = new BitSet(new ulong[] { 0x0UL, 0x2000000000UL });
            public static readonly BitSet _101_in_define849 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_define851 = new BitSet(new ulong[] { 0x0UL, 0x18000000000UL });
            public static readonly BitSet _103_in_define856 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_define858 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _104_in_define880 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_define882 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _105_in_define899 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_define901 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_define905 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _97_in_define910 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_define914 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _100_in_define920 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_define923 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _66_in_define937 = new BitSet(new ulong[] { 0x0UL, 0x2000000000UL });
            public static readonly BitSet _101_in_define939 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_define941 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C800001100UL });
            public static readonly BitSet _dparameter_in_define945 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C800001100UL });
            public static readonly BitSet _dstatement_in_define948 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_define950 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _72_in_dparameter985 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_dparameter987 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_dparameter990 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_dparameter992 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_dparameter997 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _block_in_dstatement1024 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _expression_in_dstatement1033 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _99_in_block1059 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10005D800001110UL, 0x28UL });
            public static readonly BitSet _statement_in_block1064 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10005D800001110UL, 0x28UL });
            public static readonly BitSet _expression_in_block1075 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_block1082 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _block_in_statement1116 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _localVariableDeclaration_in_statement1143 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ifExpression_in_statement1152 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _whileExpression_in_statement1161 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _expression_in_statement1172 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_statement1174 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _68_in_statement1187 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _106_in_localVariableDeclaration1205 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_localVariableDeclaration1207 = new BitSet(new ulong[] { 0x0UL, 0x80000000010UL });
            public static readonly BitSet _107_in_localVariableDeclaration1210 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_localVariableDeclaration1212 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_localVariableDeclaration1216 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _106_in_localVariableDeclaration1233 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_localVariableDeclaration1235 = new BitSet(new ulong[] { 0x0UL, 0x80000000000UL });
            public static readonly BitSet _107_in_localVariableDeclaration1237 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _recordExpression_in_localVariableDeclaration1239 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_localVariableDeclaration1241 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _106_in_localVariableDeclaration1256 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_localVariableDeclaration1258 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _108_in_localVariableDeclaration1261 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_localVariableDeclaration1263 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_localVariableDeclaration1265 = new BitSet(new ulong[] { 0x0UL, 0x180000000010UL });
            public static readonly BitSet _107_in_localVariableDeclaration1270 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _recordExpression_in_localVariableDeclaration1272 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_localVariableDeclaration1276 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _conditionalOrExpression_in_expression1317 = new BitSet(new ulong[] { 0x2UL, 0x80000000000UL });
            public static readonly BitSet _107_in_expression1327 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_expression1329 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _conditionalAndExpression_in_conditionalOrExpression1382 = new BitSet(new ulong[] { 0x2UL, 0x8000UL });
            public static readonly BitSet _79_in_conditionalOrExpression1386 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalAndExpression_in_conditionalOrExpression1389 = new BitSet(new ulong[] { 0x2UL, 0x8000UL });
            public static readonly BitSet _conditionalXorExpression_in_conditionalAndExpression1421 = new BitSet(new ulong[] { 0x2UL, 0x4000UL });
            public static readonly BitSet _78_in_conditionalAndExpression1425 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalXorExpression_in_conditionalAndExpression1428 = new BitSet(new ulong[] { 0x2UL, 0x4000UL });
            public static readonly BitSet _bitwiseLogicExpression_in_conditionalXorExpression1459 = new BitSet(new ulong[] { 0x2UL, 0x400000000000UL });
            public static readonly BitSet _110_in_conditionalXorExpression1463 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _bitwiseLogicExpression_in_conditionalXorExpression1466 = new BitSet(new ulong[] { 0x2UL, 0x400000000000UL });
            public static readonly BitSet _equalityExpression_in_bitwiseLogicExpression1502 = new BitSet(new ulong[] { 0x2UL, 0x3800000000000UL });
            public static readonly BitSet _111_in_bitwiseLogicExpression1508 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _112_in_bitwiseLogicExpression1513 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _113_in_bitwiseLogicExpression1518 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _equalityExpression_in_bitwiseLogicExpression1523 = new BitSet(new ulong[] { 0x2UL, 0x3800000000000UL });
            public static readonly BitSet _relationalExpression_in_equalityExpression1553 = new BitSet(new ulong[] { 0x2UL, 0xC000000000000UL });
            public static readonly BitSet _114_in_equalityExpression1558 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _115_in_equalityExpression1561 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _relationalExpression_in_equalityExpression1565 = new BitSet(new ulong[] { 0x2UL, 0xC000000000000UL });
            public static readonly BitSet _additiveExpression_in_relationalExpression1595 = new BitSet(new ulong[] { 0x2UL, 0xF0000000000000UL });
            public static readonly BitSet _116_in_relationalExpression1600 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _117_in_relationalExpression1605 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _118_in_relationalExpression1610 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _119_in_relationalExpression1615 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _additiveExpression_in_relationalExpression1619 = new BitSet(new ulong[] { 0x2UL, 0xF0000000000000UL });
            public static readonly BitSet _multiplicativeExpression_in_additiveExpression1648 = new BitSet(new ulong[] { 0x2UL, 0x100004000000000UL });
            public static readonly BitSet _120_in_additiveExpression1653 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _102_in_additiveExpression1658 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _multiplicativeExpression_in_additiveExpression1662 = new BitSet(new ulong[] { 0x2UL, 0x100004000000000UL });
            public static readonly BitSet _unaryExpression_in_multiplicativeExpression1689 = new BitSet(new ulong[] { 0x2UL, 0xE00000000000000UL });
            public static readonly BitSet _121_in_multiplicativeExpression1694 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _122_in_multiplicativeExpression1699 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _123_in_multiplicativeExpression1704 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _unaryExpression_in_multiplicativeExpression1709 = new BitSet(new ulong[] { 0x2UL, 0xE00000000000000UL });
            public static readonly BitSet _120_in_unaryExpression1739 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _unaryExpression_in_unaryExpression1741 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _102_in_unaryExpression1755 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _unaryExpression_in_unaryExpression1757 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _76_in_unaryExpression1773 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC000018000000100UL });
            public static readonly BitSet _unaryExpressionNotPlusMinus_in_unaryExpression1776 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _unaryExpressionNotPlusMinus_in_unaryExpression1787 = new BitSet(new ulong[] { 0x0UL, 0x3000000000000000UL });
            public static readonly BitSet _124_in_unaryExpression1800 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _125_in_unaryExpression1831 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _unaryExpressionNotPlusMinus_in_unaryExpression1872 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_arrayExpression1896 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _108_in_arrayExpression1899 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_arrayExpression1901 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_arrayExpression1903 = new BitSet(new ulong[] { 0x2UL, 0x100000000000UL });
            public static readonly BitSet _INT_in_unaryExpressionNotPlusMinus1942 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _103_in_unaryExpressionNotPlusMinus1949 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _104_in_unaryExpressionNotPlusMinus1955 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _126_in_unaryExpressionNotPlusMinus1964 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_unaryExpressionNotPlusMinus1966 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_unaryExpressionNotPlusMinus1968 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_unaryExpressionNotPlusMinus1971 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_unaryExpressionNotPlusMinus1973 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_unaryExpressionNotPlusMinus1977 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _127_in_unaryExpressionNotPlusMinus1997 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_unaryExpressionNotPlusMinus1999 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_unaryExpressionNotPlusMinus2001 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001300UL });
            public static readonly BitSet _conditionalOrExpression_in_unaryExpressionNotPlusMinus2004 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_unaryExpressionNotPlusMinus2007 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_unaryExpressionNotPlusMinus2009 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_unaryExpressionNotPlusMinus2015 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_unaryExpressionNotPlusMinus2035 = new BitSet(new ulong[] { 0x0UL, 0x200000UL });
            public static readonly BitSet _85_in_unaryExpressionNotPlusMinus2037 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_unaryExpressionNotPlusMinus2041 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_unaryExpressionNotPlusMinus2043 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001300UL });
            public static readonly BitSet _conditionalOrExpression_in_unaryExpressionNotPlusMinus2046 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_unaryExpressionNotPlusMinus2049 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_unaryExpressionNotPlusMinus2051 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_unaryExpressionNotPlusMinus2057 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _arrayExpression_in_unaryExpressionNotPlusMinus2080 = new BitSet(new ulong[] { 0x0UL, 0x200000UL });
            public static readonly BitSet _85_in_unaryExpressionNotPlusMinus2082 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_unaryExpressionNotPlusMinus2086 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_unaryExpressionNotPlusMinus2088 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001300UL });
            public static readonly BitSet _conditionalOrExpression_in_unaryExpressionNotPlusMinus2091 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_unaryExpressionNotPlusMinus2094 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_unaryExpressionNotPlusMinus2096 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_unaryExpressionNotPlusMinus2102 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _arrayExpression_in_unaryExpressionNotPlusMinus2126 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _72_in_unaryExpressionNotPlusMinus2132 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_unaryExpressionNotPlusMinus2134 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_unaryExpressionNotPlusMinus2136 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_unaryExpressionNotPlusMinus2147 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _106_in_letDefintion2183 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x10000000000000UL });
            public static readonly BitSet _128_in_letDefintion2187 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x10000000000000UL });
            public static readonly BitSet _116_in_letDefintion2191 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_letDefintion2195 = new BitSet(new ulong[] { 0x0UL, 0x20000000000000UL });
            public static readonly BitSet _117_in_letDefintion2197 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_letDefintion2203 = new BitSet(new ulong[] { 0x0UL, 0x80000000010UL, 0x2UL });
            public static readonly BitSet _varaibleRange_in_letDefintion2205 = new BitSet(new ulong[] { 0x0UL, 0x80000000010UL });
            public static readonly BitSet _107_in_letDefintion2209 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC30001C000001100UL });
            public static readonly BitSet _expression_in_letDefintion2212 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _121_in_letDefintion2216 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_letDefintion2222 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _106_in_letDefintion2257 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _128_in_letDefintion2261 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_letDefintion2264 = new BitSet(new ulong[] { 0x0UL, 0x80000000000UL, 0x2UL });
            public static readonly BitSet _varaibleRange_in_letDefintion2266 = new BitSet(new ulong[] { 0x0UL, 0x80000000000UL });
            public static readonly BitSet _107_in_letDefintion2269 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _recordExpression_in_letDefintion2271 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_letDefintion2273 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _106_in_letDefintion2295 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _128_in_letDefintion2299 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_letDefintion2302 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _108_in_letDefintion2305 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_letDefintion2307 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_letDefintion2309 = new BitSet(new ulong[] { 0x0UL, 0x180000000010UL, 0x2UL });
            public static readonly BitSet _varaibleRange_in_letDefintion2313 = new BitSet(new ulong[] { 0x0UL, 0x80000000010UL });
            public static readonly BitSet _107_in_letDefintion2317 = new BitSet(new ulong[] { 0x0UL, 0x200100000000000UL });
            public static readonly BitSet _recordExpression_in_letDefintion2320 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _121_in_letDefintion2324 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_letDefintion2330 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _129_in_varaibleRange2382 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_varaibleRange2384 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL, 0x4UL });
            public static readonly BitSet _additiveExpression_in_varaibleRange2389 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x4UL });
            public static readonly BitSet _130_in_varaibleRange2393 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001D000001100UL });
            public static readonly BitSet _additiveExpression_in_varaibleRange2398 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_varaibleRange2402 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _131_in_ifExpression2449 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_ifExpression2451 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_ifExpression2453 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_ifExpression2455 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10005C800001110UL, 0x28UL });
            public static readonly BitSet _statement_in_ifExpression2459 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x10UL });
            public static readonly BitSet _132_in_ifExpression2464 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10005C800001110UL, 0x28UL });
            public static readonly BitSet _statement_in_ifExpression2468 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _133_in_whileExpression2512 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_whileExpression2514 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_whileExpression2516 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_whileExpression2518 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10005C800001110UL, 0x28UL });
            public static readonly BitSet _statement_in_whileExpression2522 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _108_in_recordExpression2565 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _recordElement_in_recordExpression2567 = new BitSet(new ulong[] { 0x0UL, 0x200200000000UL });
            public static readonly BitSet _97_in_recordExpression2570 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _recordElement_in_recordExpression2572 = new BitSet(new ulong[] { 0x0UL, 0x200200000000UL });
            public static readonly BitSet _109_in_recordExpression2576 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _expression_in_recordElement2599 = new BitSet(new ulong[] { 0x2UL, 0x100UL, 0x4UL });
            public static readonly BitSet _72_in_recordElement2610 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_recordElement2614 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_recordElement2616 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _130_in_recordElement2637 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_recordElement2641 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_definition2699 = new BitSet(new ulong[] { 0x0UL, 0x80000000100UL });
            public static readonly BitSet _72_in_definition2702 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x200UL });
            public static readonly BitSet _ID_in_definition2705 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_definition2708 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_definition2710 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_definition2717 = new BitSet(new ulong[] { 0x0UL, 0x80000000000UL });
            public static readonly BitSet _107_in_definition2721 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_definition2723 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_definition2725 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _134_in_definition2745 = new BitSet(new ulong[] { 0x1000000000000000UL });
            public static readonly BitSet _STRING_in_definition2749 = new BitSet(new ulong[] { 0x0UL, 0x100UL, 0x2UL });
            public static readonly BitSet _72_in_definition2753 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x200UL });
            public static readonly BitSet _ID_in_definition2756 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_definition2759 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_definition2761 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_definition2768 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x2UL });
            public static readonly BitSet _129_in_definition2772 = new BitSet(new ulong[] { 0x1000000000000000UL, 0x10UL });
            public static readonly BitSet _transition_in_definition2774 = new BitSet(new ulong[] { 0x1000000000000000UL, 0x10UL });
            public static readonly BitSet _68_in_definition2777 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _STRING_in_transition2820 = new BitSet(new ulong[] { 0x0UL, 0x2000000000000000UL });
            public static readonly BitSet _125_in_transition2822 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL, 0x480UL });
            public static readonly BitSet _select_in_transition2824 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL, 0x80UL });
            public static readonly BitSet _108_in_transition2828 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_transition2830 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_transition2832 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x80UL });
            public static readonly BitSet _135_in_transition2836 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x10000UL });
            public static readonly BitSet _eventT_in_transition2838 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x100UL });
            public static readonly BitSet _136_in_transition2840 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL, 0x200UL });
            public static readonly BitSet _block_in_transition2843 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x200UL });
            public static readonly BitSet _137_in_transition2848 = new BitSet(new ulong[] { 0x1000000000000000UL });
            public static readonly BitSet _STRING_in_transition2852 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _138_in_select2886 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x2UL });
            public static readonly BitSet _129_in_select2888 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_select2891 = new BitSet(new ulong[] { 0x2UL, 0x10UL });
            public static readonly BitSet _68_in_select2894 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_select2896 = new BitSet(new ulong[] { 0x2UL, 0x10UL });
            public static readonly BitSet _ID_in_eventT2929 = new BitSet(new ulong[] { 0x0UL, 0x1000UL });
            public static readonly BitSet _76_in_eventT2931 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_eventT2947 = new BitSet(new ulong[] { 0x0UL, 0x2000UL });
            public static readonly BitSet _77_in_eventT2949 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_eventT2966 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _108_in_eventT2968 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_eventT2970 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_eventT2972 = new BitSet(new ulong[] { 0x0UL, 0x1000UL });
            public static readonly BitSet _76_in_eventT2974 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_eventT2992 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _108_in_eventT2994 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_eventT2996 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_eventT2998 = new BitSet(new ulong[] { 0x0UL, 0x2000UL });
            public static readonly BitSet _77_in_eventT3000 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _eventM_in_eventT3017 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _parallelExpr_in_interleaveExpr3045 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x800UL });
            public static readonly BitSet _139_in_interleaveExpr3057 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2008UL });
            public static readonly BitSet _parallelExpr_in_interleaveExpr3059 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x800UL });
            public static readonly BitSet _139_in_interleaveExpr3097 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_interleaveExpr3100 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _68_in_interleaveExpr3103 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_interleaveExpr3105 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _140_in_interleaveExpr3111 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_interleaveExpr3113 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _139_in_interleaveExpr3129 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _paralDef2_in_interleaveExpr3131 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x1000UL });
            public static readonly BitSet _140_in_interleaveExpr3133 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_interleaveExpr3135 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _generalChoiceExpr_in_parallelExpr3181 = new BitSet(new ulong[] { 0x2UL, 0x8000UL });
            public static readonly BitSet _79_in_parallelExpr3190 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010D40UL, 0x7D2008UL });
            public static readonly BitSet _generalChoiceExpr_in_parallelExpr3192 = new BitSet(new ulong[] { 0x2UL, 0x8000UL });
            public static readonly BitSet _79_in_parallelExpr3221 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_parallelExpr3224 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _68_in_parallelExpr3227 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_parallelExpr3229 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _140_in_parallelExpr3235 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_parallelExpr3237 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_paralDef3270 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x2UL });
            public static readonly BitSet _129_in_paralDef3272 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_paralDef3274 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _additiveExpression_in_paralDef3276 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _97_in_paralDef3279 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _additiveExpression_in_paralDef3281 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _100_in_paralDef3286 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_paralDef3303 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x2UL });
            public static readonly BitSet _129_in_paralDef3305 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_paralDef3307 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _additiveExpression_in_paralDef3311 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x4UL });
            public static readonly BitSet _130_in_paralDef3313 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _additiveExpression_in_paralDef3317 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_paralDef3320 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _99_in_paralDef23348 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x4UL });
            public static readonly BitSet _130_in_paralDef23350 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_paralDef23352 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _99_in_paralDef23366 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _additiveExpression_in_paralDef23370 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_paralDef23372 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _internalChoiceExpr_in_generalChoiceExpr3419 = new BitSet(new ulong[] { 0x2UL, 0x400UL });
            public static readonly BitSet _74_in_generalChoiceExpr3431 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010940UL, 0x7D2008UL });
            public static readonly BitSet _internalChoiceExpr_in_generalChoiceExpr3433 = new BitSet(new ulong[] { 0x2UL, 0x400UL });
            public static readonly BitSet _74_in_generalChoiceExpr3471 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_generalChoiceExpr3474 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _68_in_generalChoiceExpr3477 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_generalChoiceExpr3479 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _140_in_generalChoiceExpr3485 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_generalChoiceExpr3487 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _externalChoiceExpr_in_internalChoiceExpr3541 = new BitSet(new ulong[] { 0x2UL, 0x800UL });
            public static readonly BitSet _75_in_internalChoiceExpr3553 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010140UL, 0x7D2008UL });
            public static readonly BitSet _externalChoiceExpr_in_internalChoiceExpr3555 = new BitSet(new ulong[] { 0x2UL, 0x800UL });
            public static readonly BitSet _75_in_internalChoiceExpr3593 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_internalChoiceExpr3596 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _68_in_internalChoiceExpr3599 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_internalChoiceExpr3601 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _140_in_internalChoiceExpr3607 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_internalChoiceExpr3609 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _interruptExpr_in_externalChoiceExpr3656 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x2000UL });
            public static readonly BitSet _141_in_externalChoiceExpr3668 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010140UL, 0x7D0008UL });
            public static readonly BitSet _interruptExpr_in_externalChoiceExpr3670 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x2000UL });
            public static readonly BitSet _141_in_externalChoiceExpr3708 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_externalChoiceExpr3711 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _68_in_externalChoiceExpr3714 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _paralDef_in_externalChoiceExpr3716 = new BitSet(new ulong[] { 0x0UL, 0x10UL, 0x1000UL });
            public static readonly BitSet _140_in_externalChoiceExpr3722 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_externalChoiceExpr3724 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _hidingExpr_in_interruptExpr3762 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x4000UL });
            public static readonly BitSet _142_in_interruptExpr3765 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010140UL, 0x7D0008UL });
            public static readonly BitSet _hidingExpr_in_interruptExpr3768 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x4000UL });
            public static readonly BitSet _sequentialExpr_in_hidingExpr3798 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x8000UL });
            public static readonly BitSet _143_in_hidingExpr3810 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_hidingExpr3812 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _eventName_in_hidingExpr3814 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _97_in_hidingExpr3818 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _eventName_in_hidingExpr3820 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _100_in_hidingExpr3825 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _guardExpr_in_sequentialExpr3876 = new BitSet(new ulong[] { 0x2UL, 0x10UL });
            public static readonly BitSet _68_in_sequentialExpr3879 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010140UL, 0x7D0008UL });
            public static readonly BitSet _guardExpr_in_sequentialExpr3882 = new BitSet(new ulong[] { 0x2UL, 0x10UL });
            public static readonly BitSet _channelExpr_in_guardExpr3907 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _108_in_guardExpr3912 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_guardExpr3914 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_guardExpr3916 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_guardExpr3918 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_channelExpr3958 = new BitSet(new ulong[] { 0x0UL, 0x1000UL });
            public static readonly BitSet _76_in_channelExpr3960 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_channelExpr3962 = new BitSet(new ulong[] { 0x0UL, 0x220000UL });
            public static readonly BitSet _85_in_channelExpr3965 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_channelExpr3967 = new BitSet(new ulong[] { 0x0UL, 0x220000UL });
            public static readonly BitSet _81_in_channelExpr3971 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_channelExpr3973 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_channelExpr3994 = new BitSet(new ulong[] { 0x0UL, 0x2000UL });
            public static readonly BitSet _77_in_channelExpr3996 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10011C000001100UL });
            public static readonly BitSet _108_in_channelExpr3999 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_channelExpr4003 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_channelExpr4005 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_channelExpr4009 = new BitSet(new ulong[] { 0x0UL, 0x220000UL });
            public static readonly BitSet _85_in_channelExpr4012 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_channelExpr4014 = new BitSet(new ulong[] { 0x0UL, 0x220000UL });
            public static readonly BitSet _81_in_channelExpr4019 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_channelExpr4021 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _eventExpr_in_channelExpr4045 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _eventM_in_eventExpr4067 = new BitSet(new ulong[] { 0x0UL, 0x800020000UL });
            public static readonly BitSet _block_in_eventExpr4070 = new BitSet(new ulong[] { 0x0UL, 0x20000UL });
            public static readonly BitSet _81_in_eventExpr4074 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_eventExpr4076 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _block_in_eventExpr4095 = new BitSet(new ulong[] { 0x0UL, 0x20000UL });
            public static readonly BitSet _81_in_eventExpr4097 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_eventExpr4099 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _72_in_eventExpr4114 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x10000UL });
            public static readonly BitSet _eventM_in_eventExpr4116 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_eventExpr4119 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x10000UL });
            public static readonly BitSet _eventM_in_eventExpr4121 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_eventExpr4125 = new BitSet(new ulong[] { 0x0UL, 0x20000UL });
            public static readonly BitSet _81_in_eventExpr4127 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_eventExpr4129 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _caseExpr_in_eventExpr4151 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _144_in_caseExpr4173 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_caseExpr4183 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _caseCondition_in_caseExpr4188 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001D000001100UL, 0x20000UL });
            public static readonly BitSet _145_in_caseExpr4194 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x2UL });
            public static readonly BitSet _129_in_caseExpr4196 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_caseExpr4200 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_caseExpr4208 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ifExpr_in_caseExpr4238 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _conditionalOrExpression_in_caseCondition4251 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x2UL });
            public static readonly BitSet _129_in_caseCondition4253 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_caseCondition4255 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _atomicExpr_in_ifExpr4288 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ifExprs_in_ifExpr4295 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _131_in_ifExprs4306 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_ifExprs4308 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_ifExprs4310 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_ifExprs4312 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_ifExprs4314 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_ifExprs4318 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_ifExprs4320 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x10UL });
            public static readonly BitSet _132_in_ifExprs4323 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _ifBlock_in_ifExprs4327 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _146_in_ifExprs4351 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_ifExprs4353 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_ifExprs4355 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_ifExprs4357 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_ifExprs4360 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_ifExprs4364 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_ifExprs4366 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x10UL });
            public static readonly BitSet _132_in_ifExprs4369 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _ifBlock_in_ifExprs4373 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _147_in_ifExprs4398 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_ifExprs4400 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_ifExprs4402 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_ifExprs4404 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_ifExprs4407 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_ifExprs4409 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_ifExprs4411 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ifExprs_in_ifBlock4435 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _99_in_ifBlock4440 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_ifBlock4443 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_ifBlock4445 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _atom_in_atomicExpr4470 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _148_in_atomicExpr4477 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_atomicExpr4479 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_atomicExpr4481 = new BitSet(new ulong[] { 0x0UL, 0x1000000000UL });
            public static readonly BitSet _100_in_atomicExpr4483 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_atom4507 = new BitSet(new ulong[] { 0x2UL, 0x100UL });
            public static readonly BitSet _72_in_atom4511 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001300UL });
            public static readonly BitSet _expression_in_atom4514 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_atom4517 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_atom4519 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_atom4527 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _149_in_atom4547 = new BitSet(new ulong[] { 0x2UL, 0x100UL });
            public static readonly BitSet _72_in_atom4550 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_atom4553 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _150_in_atom4562 = new BitSet(new ulong[] { 0x2UL, 0x100UL });
            public static readonly BitSet _72_in_atom4565 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_atom4568 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _70_in_atom4577 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_atom4579 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_atom4581 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_atom4583 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _72_in_atom4597 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2808UL });
            public static readonly BitSet _interleaveExpr_in_atom4599 = new BitSet(new ulong[] { 0x0UL, 0x200UL });
            public static readonly BitSet _73_in_atom4601 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _eventName_in_eventM4622 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _80_in_eventM4636 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_eventName4661 = new BitSet(new ulong[] { 0x2UL, 0x200000UL });
            public static readonly BitSet _85_in_eventName4665 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _additiveExpression_in_eventName4669 = new BitSet(new ulong[] { 0x2UL, 0x200000UL });
            public static readonly BitSet _66_in_synpred40_PNTree816 = new BitSet(new ulong[] { 0x0UL, 0x2000000000UL });
            public static readonly BitSet _101_in_synpred40_PNTree818 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_synpred40_PNTree820 = new BitSet(new ulong[] { 0x4000000000000000UL, 0x4000000000UL });
            public static readonly BitSet _102_in_synpred40_PNTree824 = new BitSet(new ulong[] { 0x4000000000000000UL });
            public static readonly BitSet _INT_in_synpred40_PNTree827 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_synpred40_PNTree829 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _66_in_synpred42_PNTree847 = new BitSet(new ulong[] { 0x0UL, 0x2000000000UL });
            public static readonly BitSet _101_in_synpred42_PNTree849 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_synpred42_PNTree851 = new BitSet(new ulong[] { 0x0UL, 0x18000000000UL });
            public static readonly BitSet _103_in_synpred42_PNTree856 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_synpred42_PNTree858 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _104_in_synpred42_PNTree880 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_synpred42_PNTree882 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _dparameter_in_synpred45_PNTree945 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _statement_in_synpred48_PNTree1064 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _unaryExpressionNotPlusMinus_in_synpred82_PNTree1787 = new BitSet(new ulong[] { 0x0UL, 0x3000000000000000UL });
            public static readonly BitSet _124_in_synpred82_PNTree1800 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _125_in_synpred82_PNTree1831 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_synpred94_PNTree2035 = new BitSet(new ulong[] { 0x0UL, 0x200000UL });
            public static readonly BitSet _85_in_synpred94_PNTree2037 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_synpred94_PNTree2041 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_synpred94_PNTree2043 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001300UL });
            public static readonly BitSet _conditionalOrExpression_in_synpred94_PNTree2046 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_synpred94_PNTree2049 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_synpred94_PNTree2051 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_synpred94_PNTree2057 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _arrayExpression_in_synpred97_PNTree2080 = new BitSet(new ulong[] { 0x0UL, 0x200000UL });
            public static readonly BitSet _85_in_synpred97_PNTree2082 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_synpred97_PNTree2086 = new BitSet(new ulong[] { 0x0UL, 0x100UL });
            public static readonly BitSet _72_in_synpred97_PNTree2088 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001300UL });
            public static readonly BitSet _conditionalOrExpression_in_synpred97_PNTree2091 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_synpred97_PNTree2094 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_synpred97_PNTree2096 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_synpred97_PNTree2102 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _arrayExpression_in_synpred98_PNTree2126 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _106_in_synpred105_PNTree2183 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x10000000000000UL });
            public static readonly BitSet _128_in_synpred105_PNTree2187 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x10000000000000UL });
            public static readonly BitSet _116_in_synpred105_PNTree2191 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_synpred105_PNTree2195 = new BitSet(new ulong[] { 0x0UL, 0x20000000000000UL });
            public static readonly BitSet _117_in_synpred105_PNTree2197 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_synpred105_PNTree2203 = new BitSet(new ulong[] { 0x0UL, 0x80000000010UL, 0x2UL });
            public static readonly BitSet _varaibleRange_in_synpred105_PNTree2205 = new BitSet(new ulong[] { 0x0UL, 0x80000000010UL });
            public static readonly BitSet _107_in_synpred105_PNTree2209 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC30001C000001100UL });
            public static readonly BitSet _expression_in_synpred105_PNTree2212 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _121_in_synpred105_PNTree2216 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_synpred105_PNTree2222 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _106_in_synpred108_PNTree2257 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _128_in_synpred108_PNTree2261 = new BitSet(new ulong[] { 0x2000000000000000UL });
            public static readonly BitSet _ID_in_synpred108_PNTree2264 = new BitSet(new ulong[] { 0x0UL, 0x80000000000UL, 0x2UL });
            public static readonly BitSet _varaibleRange_in_synpred108_PNTree2266 = new BitSet(new ulong[] { 0x0UL, 0x80000000000UL });
            public static readonly BitSet _107_in_synpred108_PNTree2269 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _recordExpression_in_synpred108_PNTree2271 = new BitSet(new ulong[] { 0x0UL, 0x10UL });
            public static readonly BitSet _68_in_synpred108_PNTree2273 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _132_in_synpred116_PNTree2464 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10005C800001110UL, 0x28UL });
            public static readonly BitSet _statement_in_synpred116_PNTree2468 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_synpred132_PNTree2929 = new BitSet(new ulong[] { 0x0UL, 0x1000UL });
            public static readonly BitSet _76_in_synpred132_PNTree2931 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_synpred133_PNTree2947 = new BitSet(new ulong[] { 0x0UL, 0x2000UL });
            public static readonly BitSet _77_in_synpred133_PNTree2949 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_synpred134_PNTree2966 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _108_in_synpred134_PNTree2968 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_synpred134_PNTree2970 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_synpred134_PNTree2972 = new BitSet(new ulong[] { 0x0UL, 0x1000UL });
            public static readonly BitSet _76_in_synpred134_PNTree2974 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_synpred135_PNTree2992 = new BitSet(new ulong[] { 0x0UL, 0x100000000000UL });
            public static readonly BitSet _108_in_synpred135_PNTree2994 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_synpred135_PNTree2996 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_synpred135_PNTree2998 = new BitSet(new ulong[] { 0x0UL, 0x2000UL });
            public static readonly BitSet _77_in_synpred135_PNTree3000 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _139_in_synpred136_PNTree3057 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2008UL });
            public static readonly BitSet _parallelExpr_in_synpred136_PNTree3059 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _139_in_synpred137_PNTree3057 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800018D40UL, 0x7D2008UL });
            public static readonly BitSet _parallelExpr_in_synpred137_PNTree3059 = new BitSet(new ulong[] { 0x2UL, 0x0UL, 0x800UL });
            public static readonly BitSet _79_in_synpred141_PNTree3190 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010D40UL, 0x7D2008UL });
            public static readonly BitSet _generalChoiceExpr_in_synpred141_PNTree3192 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _79_in_synpred142_PNTree3190 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010D40UL, 0x7D2008UL });
            public static readonly BitSet _generalChoiceExpr_in_synpred142_PNTree3192 = new BitSet(new ulong[] { 0x2UL, 0x8000UL });
            public static readonly BitSet _ID_in_synpred146_PNTree3270 = new BitSet(new ulong[] { 0x0UL, 0x0UL, 0x2UL });
            public static readonly BitSet _129_in_synpred146_PNTree3272 = new BitSet(new ulong[] { 0x0UL, 0x800000000UL });
            public static readonly BitSet _99_in_synpred146_PNTree3274 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _additiveExpression_in_synpred146_PNTree3276 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _97_in_synpred146_PNTree3279 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _additiveExpression_in_synpred146_PNTree3281 = new BitSet(new ulong[] { 0x0UL, 0x1200000000UL });
            public static readonly BitSet _100_in_synpred146_PNTree3286 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _74_in_synpred148_PNTree3431 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010940UL, 0x7D2008UL });
            public static readonly BitSet _internalChoiceExpr_in_synpred148_PNTree3433 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _74_in_synpred149_PNTree3431 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010940UL, 0x7D2008UL });
            public static readonly BitSet _internalChoiceExpr_in_synpred149_PNTree3433 = new BitSet(new ulong[] { 0x2UL, 0x400UL });
            public static readonly BitSet _75_in_synpred152_PNTree3553 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010140UL, 0x7D2008UL });
            public static readonly BitSet _externalChoiceExpr_in_synpred152_PNTree3555 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _75_in_synpred153_PNTree3553 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x100800010140UL, 0x7D2008UL });
            public static readonly BitSet _externalChoiceExpr_in_synpred153_PNTree3555 = new BitSet(new ulong[] { 0x2UL, 0x800UL });
            public static readonly BitSet _ID_in_synpred166_PNTree3958 = new BitSet(new ulong[] { 0x0UL, 0x1000UL });
            public static readonly BitSet _76_in_synpred166_PNTree3960 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_synpred166_PNTree3962 = new BitSet(new ulong[] { 0x0UL, 0x220000UL });
            public static readonly BitSet _85_in_synpred166_PNTree3965 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_synpred166_PNTree3967 = new BitSet(new ulong[] { 0x0UL, 0x220000UL });
            public static readonly BitSet _81_in_synpred166_PNTree3971 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_synpred166_PNTree3973 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _ID_in_synpred169_PNTree3994 = new BitSet(new ulong[] { 0x0UL, 0x2000UL });
            public static readonly BitSet _77_in_synpred169_PNTree3996 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10011C000001100UL });
            public static readonly BitSet _108_in_synpred169_PNTree3999 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _conditionalOrExpression_in_synpred169_PNTree4003 = new BitSet(new ulong[] { 0x0UL, 0x200000000000UL });
            public static readonly BitSet _109_in_synpred169_PNTree4005 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_synpred169_PNTree4009 = new BitSet(new ulong[] { 0x0UL, 0x220000UL });
            public static readonly BitSet _85_in_synpred169_PNTree4012 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_synpred169_PNTree4014 = new BitSet(new ulong[] { 0x0UL, 0x220000UL });
            public static readonly BitSet _81_in_synpred169_PNTree4019 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_synpred169_PNTree4021 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _eventM_in_synpred171_PNTree4067 = new BitSet(new ulong[] { 0x0UL, 0x800020000UL });
            public static readonly BitSet _block_in_synpred171_PNTree4070 = new BitSet(new ulong[] { 0x0UL, 0x20000UL });
            public static readonly BitSet _81_in_synpred171_PNTree4074 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_synpred171_PNTree4076 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _72_in_synpred174_PNTree4114 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x10000UL });
            public static readonly BitSet _eventM_in_synpred174_PNTree4116 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_synpred174_PNTree4119 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x10000UL });
            public static readonly BitSet _eventM_in_synpred174_PNTree4121 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_synpred174_PNTree4125 = new BitSet(new ulong[] { 0x0UL, 0x20000UL });
            public static readonly BitSet _81_in_synpred174_PNTree4127 = new BitSet(new ulong[] { 0x2000000000000000UL, 0x800010140UL, 0x7D0008UL });
            public static readonly BitSet _channelExpr_in_synpred174_PNTree4129 = new BitSet(new ulong[] { 0x2UL });
            public static readonly BitSet _72_in_synpred187_PNTree4511 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001300UL });
            public static readonly BitSet _expression_in_synpred187_PNTree4514 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _97_in_synpred187_PNTree4517 = new BitSet(new ulong[] { 0x6000000000000000UL, 0xC10001C000001100UL });
            public static readonly BitSet _expression_in_synpred187_PNTree4519 = new BitSet(new ulong[] { 0x0UL, 0x200000200UL });
            public static readonly BitSet _73_in_synpred187_PNTree4527 = new BitSet(new ulong[] { 0x2UL });

        }
        #endregion Follow sets
    }
}